public static void main(String[] args) {
int count = 0;
for (int i = 0; i < 1000000; i++) {
if (Math.sqrt(i + 100) % 1 == 0 && Math.sqrt(i + 168) %1 == 0) {
System.out.print(i);
count++;
if (count % 10 == 0)
System.out.println();
}
}
}