import java.util.Scanner;
public class Main {
public static void ApplyFTA(int n) {
int fm, i = 2;
while(!(n == 1)) {
fm = 0;
while(n % i == 0) {
n /= i;
fm += 1;
}
if( fm
!= 0 ) System.
out.
println(i
+ " ^ " + fm
); i += 1;
}
}
public static void main
(String args
[]) {
System.
out.
println("Fundamental Theorem of Arithmetic");
Scanner keyboard
= new Scanner
( System.
in );
int n = keyboard.nextInt();
ApplyFTA( n );
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKcHVibGljIGNsYXNzIE1haW4gewoKICAgICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBBcHBseUZUQShpbnQgbikgewoKICAgICAgICAgICAgICBpbnQgZm0sIGkgPSAyOwoKICAgICAgICAgICAgICB3aGlsZSghKG4gPT0gMSkpIHsKCiAgICAgICAgICAgICAgICAgICAgIGZtID0gMDsKCiAgICAgICAgICAgICAgICAgICAgIHdoaWxlKG4gJSBpID09IDApIHsKCiAgICAgICAgICAgICAgICAgICAgICAgbiAvPSBpOwoKICAgICAgICAgICAgICAgICAgICAgICBmbSArPSAxOwoKICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgaWYoIGZtICE9IDAgKSBTeXN0ZW0ub3V0LnByaW50bG4oaSArICIgXiAiICsgZm0pOwogICAgICAgICAgICAgICAgICAgICBpICs9IDE7CiAgICAgICAgICAgICAgfQogICAgICAgfQoKICAgICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZyBhcmdzW10pIHsKCiAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJGdW5kYW1lbnRhbCBUaGVvcmVtIG9mIEFyaXRobWV0aWMiKTsKCiAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludCgiTiA9ICIpOwoKICAgICAgICAgICAgICBTY2FubmVyIGtleWJvYXJkID0gbmV3IFNjYW5uZXIoIFN5c3RlbS5pbiApOwoKICAgICAgICAgICAgICBpbnQgbiA9IGtleWJvYXJkLm5leHRJbnQoKTsKCiAgICAgICAgICAgICAgQXBwbHlGVEEoIG4gKTsKICAgICAgIH0KfQo=