시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1318 891 815 68.893%

문제

과거 이집트인들은 각 변들의 길이가 3, 4, 5인 삼각형이 직각 삼각형인것을 알아냈다. 주어진 세변의 길이로 삼각형이 직각인지 아닌지 구분하시오.

입력

입력은 여러개의 테스트케이스로 주어지며 마지막줄에는 0 0 0이 입력된다. 각 테스트케이스는 모두 30,000보다 작은 양의 정수로 주어지며, 각 입력은 변의 길이를 의미한다.

출력

각 입력에 대해 직각 삼각형이 맞다면 "right", 아니라면 "wrong"을 출력한다.

예제 입력 1

6 8 10
25 52 60
5 12 13
0 0 0

예제 출력 1

right
wrong
right
W3sicHJvYmxlbV9pZCI6IjQxNTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM5YzFcdWFjMDFcdWMwYmNcdWFjMDFcdWQ2MTUiLCJkZXNjcmlwdGlvbiI6IjxwPjxpbWcgYWx0PVwiXCIgc3JjPVwiXC91cGxvYWRcL2ltYWdlczNcL3JvcGUtdHJpYW5nbGUuZ2lmXCIgc3R5bGU9XCJmbG9hdDpyaWdodDsgaGVpZ2h0OjIyOXB4OyB3aWR0aDoyNTJweFwiIFwvPiBcdWFjZmNcdWFjNzAgXHVjNzc0XHVjOWQxXHVkMmI4XHVjNzc4XHViNGU0XHVjNzQwIFx1YWMwMSBcdWJjYzBcdWI0ZTRcdWM3NTggXHVhZTM4XHVjNzc0XHVhYzAwIDMsIDQsIDVcdWM3NzggXHVjMGJjXHVhYzAxXHVkNjE1XHVjNzc0IFx1YzljMVx1YWMwMSBcdWMwYmNcdWFjMDFcdWQ2MTVcdWM3NzhcdWFjODNcdWM3NDQgXHVjNTRjXHVjNTQ0XHViMGM4XHViMmU0LiBcdWM4ZmNcdWM1YjRcdWM5YzQgXHVjMTM4XHViY2MwXHVjNzU4IFx1YWUzOFx1Yzc3NFx1Yjg1YyBcdWMwYmNcdWFjMDFcdWQ2MTVcdWM3NzQgXHVjOWMxXHVhYzAxX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