private void begin() {
		geraCrivo();
		int n = Integer.parseInt(readLn());
		while (n != 0) {
			if (n == 1) {
				System.out.println("1 = 1");
			} else if (n == -1) {
				System.out.println("-1 = -1");

			} else {
				StringBuffer out = new StringBuffer();
				out.append(n);
				out.append(" = ");
				if (n < 0) {
					out.append("-1 x ");
					n = -n;
				}
				int p = 2;
				while (n > 1 && p <= 47000) {
					while (n % p == 0) {
						out.append(p);
						out.append(" x ");
						n = n / p;
					}
					// System.out.println(p);
					p = nextPrime(p);
				}
				if (n > 1) {
					out.append(n);
				}
				String output = out.toString();
				if ( n == 1 ) {
					output = output.substring(0, out.length() - 3);
				}
				System.out.println(output);
			}
			n = Integer.parseInt(readLn());
		}
	}