import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
public class Ideone{
static boolean check(int n)
{
for (int i = 1; i * i < n; i++) // перебор всех i
{
double j
= Math.
sqrt (n
- i
* i
); if ((j
== Math.
floor(j
)) && (j
!= i
)) // проверка j целое или дробное {
return true; // комбинация найдена - возвращаем true
}
}
return false; // комбинация не найдена - возвращаем false
}
public static void main
(String a
[]) { Scanner in
= new Scanner
(System.
in); int n = in.nextInt(); // считываем число, до которого будем искать
for (int k = 5; k <= n; k++) // проверка для каждого k
if (check(k))
in.close();
}
}
CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CgpwdWJsaWMgY2xhc3MgSWRlb25lewoJc3RhdGljIGJvb2xlYW4gY2hlY2soaW50IG4pCgl7CgkgICAgCgkgICAgZm9yIChpbnQgaSA9IDE7IGkgKiBpIDwgbjsgaSsrKSAvLyDQv9C10YDQtdCx0L7RgCDQstGB0LXRhSBpCgkgICAgeyAgIAoJICAgICAgICBkb3VibGUgaiA9IE1hdGguc3FydCAobiAtIGkgKiBpKTsKCSAgICAgICAgaWYgKChqID09IE1hdGguZmxvb3IoaikpICYmIChqICE9IGkpKSAvLyDQv9GA0L7QstC10YDQutCwIGog0YbQtdC70L7QtSDQuNC70Lgg0LTRgNC+0LHQvdC+0LUgCgkgICAgICAgICAgICB7CgkgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7IC8vINC60L7QvNCx0LjQvdCw0YbQuNGPINC90LDQudC00LXQvdCwIC0g0LLQvtC30LLRgNCw0YnQsNC10LwgdHJ1ZQoJICAgICAgICAgICAgfQoJICAgIH0gCgkgICAgcmV0dXJuIGZhbHNlOyAvLyDQutC+0LzQsdC40L3QsNGG0LjRjyDQvdC1INC90LDQudC00LXQvdCwIC0g0LLQvtC30LLRgNCw0YnQsNC10LwgZmFsc2UKCX0KCXB1YmxpYyB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