직각삼각형 기본 공식
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int edge[3];
while (1) {
for (int i = 0; i < 3; i++)
cin >> edge[i];
if (!edge[0] && !edge[1] && !edge[2])
break;
sort(edge, edge + 3);
edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2] ? cout << "right" : cout << "wrong";
cout << "\n";
}
}