- Code: Select all
#include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;
int main()
{
long a,b,c;
while(1)
{
cin>>a>>b>>c;
if(a==0 && b==0 && c==0) break;
if( (pow(a,2)+pow(b,2))==pow(c,2))
printf("right\n");
else printf("wrong\n");
}
return 0;
}
