public static void main(String[] args) {
		boolean[] primesUnder1000 = primeBoolArray(1000);
		ArrayList<Integer> possibleB = new ArrayList<Integer>();
		for (int i = 0; i < primesUnder1000.length; i++)
			if (primesUnder1000[i]) {
				possibleB.add(i);
				possibleB.add(-i);
			}
		int maxA = 0, maxB = 0, maxPrime = 0;
		for (int posB: possibleB){
			for (int posA = -999; posA < 1000; posA++){
				int max = max(posA, posB);
				if (max > maxPrime){
					maxA = posA;
					maxB = posB;
					maxPrime = max;
				}
			}
		}
		System.out.println(maxA * maxB);
		// Solution: -59231
	}