import java.util.Scanner; public class No227 { public static void main(String[] args) { int yaku = 0; int[] card = new int[13]; Scanner sc = new Scanner(System.in); for(int i = 0; i < 5; i++){ card[sc.nextInt() - 1]++; } sc.close(); for(int i = 0; i < card.length; i++){ if(card[i] == 2){ yaku++; }else if(card[i] == 3){ yaku += 10; } } String yakuName = null; switch(yaku){ case 1: yakuName = "ONE PAIR"; break; case 2: yakuName = "TWO PAIR"; break; case 10: yakuName = "THREE CARD"; break; case 11: yakuName = "FULL HOUSE"; break; default: yakuName = "NO HAND"; } System.out.println(yakuName); } }