using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static void Main() { int[] cnt = new int[13]; int[] a = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray(); for(int i = 0; i < 5; i++) { cnt[a[i] - 1]++; } int q = 0; for(int i = 0; i < 13; i++) { switch (q) { case 0: if (cnt[i] == 2) { q=1; } if (cnt[i] == 3) { q = 3; } break; case 1: if (cnt[i] == 2) { q = 2; } if (cnt[i] == 3) { q = 4; } break; case 3: if (cnt[i] == 2) { q = 4; } break; } } string[] ans = new string[5] { "NO HAND", "ONE PAIR", "TWO PAIR", "THREE CARD", "FULL HOUSE" }; Console.WriteLine(ans[q]); } }