#include using namespace std; typedef vector VI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) int a[13]; int main(){ REP(i,5){ int n;cin >> n; a[n-1]++; } sort(a, a+13, greater()); cout << [&](){ if(a[0] == 3 && a[1] == 2) return "FULL HOUSE"; if(a[0] == 3) return "THREE CARD"; if(a[0] == 2 && a[1] == 2) return "TWO PAIR"; if(a[0] == 2) return "ONE PAIR"; return "NO HAND"; }() << endl; }