#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); vector c(14,0); rep(i,5){ int a; cin >> a; c[a]++; } int three = 0, two = 0; rep(i,14){ if(c[i] == 3) three++; if(c[i] == 2) two++; } if(three == 1 && two == 1) cout << "FULL HOUSE" << endl; else if(three == 1) cout << "THREE CARD" << endl; else if(two == 2) cout << "TWO PAIR" << endl; else if(two == 1) cout << "ONE PAIR" << endl; else cout << "NO HAND" << endl; }