import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
// Press Shift twice to open the Search Everywhere dialog and type show whitespaces,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true) {
StringTokenizer st = new StringTokenizer(br.readLine());
double a = Integer.parseInt(st.nextToken());
double b = Integer.parseInt(st.nextToken());
double c = Integer.parseInt(st.nextToken());
if(a==0 && b==0 && c==0)
{
break;
}
double a2 = Math.pow(a, 2);
double b2 = Math.pow(b, 2);
double c2 = Math.pow(c, 2);
if(a2+b2==c2 || a2+c2==b2 || b2+c2==a2)
{
System.out.println("right");
}
else{
System.out.println("wrong");
}
}
}
}