Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), ",")
		cards := make([]int, 5)
		for i :=range input {
			cards[i], _ = strconv.Atoi(input[i])
		}
		sort.Sort(sort.IntSlice(cards))
		if cards[0] == cards[1] && cards[2] == cards[3] && cards[2] == cards[1] {
			fmt.Println("four card")
		} else if cards[1] == cards[2] && cards[3] == cards[4] && cards[3] == cards[2]{
			fmt.Println("four card")
		} else if cards[0] == cards[1] && cards[1] == cards[2] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == cards[1] && cards[2] == cards[3] && cards[3] == cards[4] {
			fmt.Println("full house")
		} else if cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13 {
			fmt.Println("straight")
		} else if cards[0]+1 == cards[1] && cards[1]+1 == cards[2] && cards[2]+1 == cards[3] && cards[3]+1 == cards[4] {
			fmt.Println("straight")
		} else if (cards[0] == cards[1] && cards[1] == cards[2]) || (cards[1] == cards[2] && cards[2] == cards[3]) || (cards[2] == cards[3] && cards[3] == cards[4]) {
			fmt.Println("three card")
		} else if ((cards[0] == cards[1]) && ((cards[2] == cards[3]) || (cards[3] == cards[4]))) || ((cards[1] == cards[2]) && (cards[3] == cards[4])) {
			fmt.Println("two pair")
		} else if cards[0] == cards[1] || cards[1] == cards[2] || cards[2] == cards[3] || cards[3] == cards[4] {
			fmt.Println("one pair")
		} else {
			fmt.Println("null")
		}
	}
}

C++: #include<algorithm>
#include<stdio.h>

int main()
{
	int card[5];
	
	while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
	 	
		int a[20];
		std::fill( a, a + 20, 0 );
		int c = 0;
		
		for( int i = 0; i < 5; i++ ) a[card[i]]++;
		
		for( int i = 0; i < 5; i++ ){
			 c = std::max( c, std::count( card, card + 5, card[i] ) );
		}
		
		bool f = false;
		int m;
		
		switch( c ){
			case 4:
		 		puts( "four card" );
				break;
			case 3:
				for( int i = 0; i < 5; i++ ){
			 		if( std::count( card, card + 5, card[i] ) == 2 ){
						f = true; 
						break;
					}
				}
				
				if( f ){
				 	puts( "full house" );
				}
				else{
				 	puts( "three card" );
				}
				break;
			case 2:
				for( int i = 0; i < 5; i++ ){
					if( std::count( card, card + 5, card[i] ) == 2 && !f ){
					 	m = card[i];
						f = true;
					}
					if( card[i] != m && std::count( card, card + 5, card[i] ) == 2 && f ){
						puts( "two pair" );
						goto end;
					}
				}
				puts( "one pair" );
				break;
			case 1:	
				for( int i = 1; i <= 10; i++ ){
					if( a[i] == 1 && a[i+1] == 1 && a[i+2] == 1 && a[i+3] == 1 && a[(i+4)%13] == 1 ) f = true;
				}
				
				if( f ){
				 	puts( "straight" );
				}
				else{
					puts( "null" );
				}
				
				break;
		}
		
	end:
	}

 	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>

#define PI 3.14159265359

#define INF 1000000;

#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)

typedef long long ll;

using namespace std;


/*
class ElectronicPetEasy
{
public:
	string isDifficult(int st1, int p1, int t1, int st2, int p2, int t2)
	{
		
	}
};
*/


int length(int a[])
{
	int res = 0, len = 0;
	REP(14)
	{
		if (a[i]) len++;
		else len = 0;
		res = max(res, len);
	}
	return res;
}


int main()
{
	int a[14], n;
	string ans;
	
	while (scanf("%d", &n) != EOF)
	{
		fill(a, a + 14, 0);
		a[n - 1]++;
		if (n == 1) a[13]++;
		for (int i=1; i<5; i++)
		{
			scanf(",%d", &n);
			a[n - 1]++;
			if (n == 1) a[13]++;
		}
		ans = "null";
		if (count(a, a + 13, 4) == 1) ans = "four card";
		else if (count(a, a + 13, 3) == 1 && count(a, a + 13, 2) == 1) ans = "full house";
		else if (length(a) == 5) ans = "straight";
		else if (count(a, a + 13, 3) == 1) ans = "three card";
		else if (count(a, a + 13, 2) == 2) ans = "two pair";
		else if (count(a, a + 13, 2) == 1) ans = "one pair";
		
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include <cstdio>
#include <utility>
#include <vector>
#include <algorithm>
using namespace std;

#define gcu getchar_unlocked
#define ii inline int in
#define bs inline bool scan
ii(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;}
ii() {return in(gcu());}
bs(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bs(char &c){c=gcu();gcu();return c!=EOF;}
// bs(string &s){int c; s = "";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#undef ii
#undef bs
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
// vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail>
vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T>
//vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

typedef vector<int> v;

int main() {
	v d(5);
	for (;;) {
		for (int &n: d)
			if (!scan(n))
				return 0;
		sort(d.begin(), d.end());
		v h(5);
		h[0] = 1;
		int t = d[0], c = 0;
		for (auto i = d.begin() + 1; i != d.end(); i++) {
			if (t != *i) {
				if (t + 1 == *i)
					h[4]++;
				t = *i, h[0]++, c = 0;
			} else
				h[c]--, c++, h[c]++;
		}
		if (d == v{1, 10, 11, 12, 13})
			h[4]++;

		if (h[4] == 4) out("straight");
		else if (h[3]) out("four card");
		else if (h[1] && h[2]) out("full house");
		else if (h[2]) out("three card");
		else if (h[1] == 2) out("two pair");
		else if (h[1]) out("one pair");
		else out("null");
		out('\n');
	}
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<sstream>
#include<algorithm>
using namespace  std;

vector<string> ss(5);
vector<int> vv(5);
int num[13];

vector<string> split(const string &s, char delimiter)
{
	vector<string> ret;
	size_t now = 0, find;
	while ((find = s.find_first_of(delimiter, now)) != string::npos)
	{
		ret.push_back(string(s, now, find - now));
		now = find + 1;
	}
	ret.push_back(string(s, now, s.size() - now));
	return ret;
}
bool isFourCard(vector<int> vv)
{
	for (int i = 0; i < 13; i++)
	{
		if (num[i] == 4)return true;
	}
	return false;
}
bool isFullhouse(vector<int> vv)
{
	for (int i = 0; i < 12; i++)
	{
		for (int j = i + 1; j < 13; j++)
		{
			if (num[i] + num[j] == 5)return true;
		}
	}
	return false;
}
bool isStraight(vector<int> vv)
{
	for (int i = 0; i < 10; i++)
	{
		int j = i % 13;
		int count = 0;
		while (num[j] == 1)
		{
			count++;
			j = (j + 1) % 13;
		}
		if (count == 5)return true;
	}
	return false;
}
bool isThreeCard(vector<int> vv)
{
	for (int i = 0; i < 13; i++)
	{
		if (num[i] == 3)return true;
	}
	return false;
}
bool isTwoPair(vector<int> vv)
{
	int count = 0;
	for (int i = 0; i < 13; i++)
	{
		if (num[i] == 2)count++;
	}
	return count == 2;
}
bool isOnePair(vector<int> vv)
{
	for (int i = 0; i < 13; i++)
	{
		if (num[i] == 2)return true;
	}
	return false;
}
string judge(vector<int> vv)
{
	if (isFourCard(vv))
	{
		return "four card";
	}
	else if (isFullhouse(vv))
	{
		return "full house";
	}
	else if (isStraight(vv))
	{
		return "straight";
	}
	else if (isThreeCard(vv))
	{
		return "three card";
	}
	else if (isTwoPair(vv))
	{
		return "two pair";
	}
	else if (isOnePair(vv))
	{
		return "one pair";
	}
	return "null";
}
int main()
{
	string s;
	while (cin >> s)
	{
		ss = split(s, ',');
		for (int i = 0; i < 14; i++)num[i] = 0;
		for (int i = 0; i < 5; i++)
		{
			stringstream str;
			str << ss[i];
			str >> vv[i];
			num[vv[i] - 1]++;
		}
		sort(vv.begin(), vv.end());
		cout << judge(vv) << endl;
	}
	return 0;
}