import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
//(1)
if (a * a == (b * b) + (c * c) || b * b == (a * a) + (c * c) || c * c == (a * a) + (b * b)) System.out.println(1);
//(2)
else if (a == b && b == c) System.out.println(2);
//(3)
else System.out.println(0);
//(4)
}
}
세 수를 입력합니다.
피타고라스의 정리를 확인하여 직각 삼각형을 만들 수 있는지 확인하여 이를 만족한다면 1을 출력합니다.
피타고라스의 정리는 직각 삼각형에서 빗변 길이의 제곱은 다른 두 변의 길이의 제곱의 합과 같습니다.