using System;
using System.Collections.Generic;
using System.Linq;

namespace AOJ0038
{
    class Program
    {
        static void Main()
        {
            foreach (var hand in ReadHands())
            {
                switch (HandValidator.Validate(hand))
                {
                    case HandValidator.HandType.Null:
                        Console.WriteLine("null");
                        break;
                    case HandValidator.HandType.OnePair:
                        Console.WriteLine("one pair");
                        break;
                    case HandValidator.HandType.TwoPair:
                        Console.WriteLine("two pair");
                        break;
                    case HandValidator.HandType.ThreeCard:
                        Console.WriteLine("three card");
                        break;
                    case HandValidator.HandType.Straight:
                        Console.WriteLine("straight");
                        break;
                    case HandValidator.HandType.FullHouse:
                        Console.WriteLine("full house");
                        break;
                    case HandValidator.HandType.FourCard:
                        Console.WriteLine("four card");
                        break;
                }
            }
        }

        public static IEnumerable<int[]> ReadHands()
        {
            string line;
            while ((line = Console.ReadLine()) != null)
            {
                yield return line.Split(',').Select(int.Parse).ToArray();
            }
        }
    }

    public static class HandValidator
    {
        public static HandType Validate(int[] hand)
        {
            var handD = new Dictionary<int, int>();
            foreach (var card in hand)
            {
                if (handD.ContainsKey(card))
                {
                    handD[card]++;
                }
                else
                {
                    handD[card] = 1;
                }
            }

            return Validate(handD);
        }

        public static HandType Validate(Dictionary<int, int> hand)
        {
            if (FourCard(hand))
            {
                return HandType.FourCard;
            }
            if (FullHouse(hand))
            {
                return HandType.FullHouse;
            }
            if (Straight(hand))
            {
                return HandType.Straight;
            }
            if (ThreeCard(hand))
            {
                return HandType.ThreeCard;
            }
            if (TwoPair(hand))
            {
                return HandType.TwoPair;
            }
            if (OnePair(hand))
            {
                return HandType.OnePair;
            }
            return HandType.Null;
        }

        private static bool OnePair(Dictionary<int, int> hand)
        {
            return hand.Any(cardSet => cardSet.Value == 2);
        }

        private static bool TwoPair(Dictionary<int, int> hand)
        {
            return hand.Count(cardSet => cardSet.Value == 2) == 2;
        }

        private static bool ThreeCard(Dictionary<int, int> hand)
        {
            return hand.Any(cardSet => cardSet.Value == 3);
        }

        private static bool Straight(Dictionary<int, int> hand)
        {
            if (hand.Count() != 5) return false;
            var sortedHand = (from pair in hand
                              orderby pair.Key
                              select pair.Key).ToArray();

            return sortedHand.SequenceEqual(Enumerable.Range(sortedHand.ElementAt(0), 5))
                || sortedHand.SequenceEqual(new[] {1, 10, 11, 12, 13});
        }

        private static bool FullHouse(Dictionary<int, int> hand)
        {
            return OnePair(hand) && ThreeCard(hand);

        }

        private static bool FourCard(Dictionary<int, int> hand)
        {
            return hand.Any(cardSet => cardSet.Value == 4);
        }

        public enum HandType
        {
            Null,
            OnePair,
            TwoPair,
            ThreeCard,
            Straight,
            FullHouse,
            FourCard,
        }
    }
}

Measured memory_bytes: 6344