https://www.acmicpc.net/problem/4153
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
for(;;){
int a=s.nextInt();
int b=s.nextInt();
int c=s.nextInt();
if(a==0&&b==0&&c==0) break;
int sum=a*a+b*b+c*c;
int ma=Math.max(a,Math.max(b,c));
if(sum-ma*ma==ma*ma) System.out.println("right");
else System.out.println("wrong");
}
}
}