package main import ( "fmt" ) import ( "bufio" "os" "strconv" ) func solve() string { var Count [14]int for i := 0; i < 5; i++ { Count[nextInt()]++ } var same [5]int for i := 1; i <= 13; i++ { same[Count[i]]++ } if same[3] == 1 && same[2] == 1 { return "FULL HOUSE" }else if same[3] == 1 { return "THREE CARD" }else if same[2] == 2 { return "TWO PAIR" }else if same[2] == 1 { return "ONE PAIR" } return "NO HAND" } func main() { fmt.Print(solve()) } var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) s.Scan() return s.Text() } func nextLine() string { s.Split(bufio.ScanLines) s.Scan() return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func nextLong() int64 { i, e := strconv.ParseInt(next(), 10, 64) if e != nil { panic(e) } return i }