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 <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

struct cards{
	int num, card;
};

bool straight( vector<int> card )
{
	sort(card.begin(), card.end());
	int st = card[0];
	bool straight1 = true, straight2 = true;
	for(int i = 1; i < 5; i++)
	{
		st++;
		if(st != card[i])
		{
			straight1 = false;
			break;
		}
	}

	for(int i = 0; i < 5; i++)
	{
		if(card[i] == 1) card[i] = 14;
	}

	sort(card.begin(), card.end());
	st = card[0];
	for(int i = 1; i < 5; i++)
	{
		st++;
		if(st != card[i])
		{
			straight2 = false;
			break;
		}
	}

	return (straight1 || straight2);
}

int main()
{
	vector<int> card(5);
	vector<int> num;
	// num, card
	while(scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF)
	{
		num.clear();

		if(straight(card))
		{
			cout << "straight" << endl;
			continue;
		}

		sort(card.begin(), card.end());
		int cnt = 1;
		for(int i = 0; i < 5; i++)
		{
			if(card[i] == card[i+1])
			{
				cnt++;
			}
			else
			{
				num.push_back(cnt);

				cnt = 1;
			}
		}

		if(num.size() == 2)
		{
			if( num[0] == 4 || num[1] == 4)
			{
				cout << "four card" << endl;
			}
			if( num[0] == 3 && num[1] == 2 || num[0] == 2 && num[1] == 3)
			{
				cout << "full house" << endl;
			}
		}
		else if(num.size() == 3)
		{
			if( num[0] == 3 || num[1] == 3 || num[2] == 3)
			{
				cout << "three card" << endl;
			}

			else if( num[0] == 2 && num[1] == 2 || num[0] == 2 && num[2] == 2 || num[1] == 2 && num[2] == 2)
			{
				cout << "two pair" << endl;
			}
		}
		else if(num.size() == 4)
		{
			cout << "one pair" << endl;
		}
		else if(num.size() == 5)
		{
			cout << "null" << endl;
		}
	}
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const string yaku[] = { "four card", "full house", "straight", "three card", "two pair", "one pair", "null" };

int main()
{
//	cut here before submit 
//	freopen ("testcase.PH", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		while (str.find(',') != string::npos ){
			str = str.replace(str.find(','), 1, " ");
		} // end while
		stringstream ss (str );
		vector<int> card (5, 0 );
		map<int,int> cnt; cnt.clear();
		rep (i, 5 ){
			int c;
			ss >> c;
			card[i] = c-1;
			cnt[card[i]]++;			
		} // end rep
		string res = yaku[6];
		map<int,int>::iterator it;
		vector<int> num (5, 0 );
		int i = 0;
		for (it = cnt.begin(); it != cnt.end(); it++ ){
			num[i++] = (*it).second;
		} // end for
		sort (ALL (num ), greater<int>() );
		if (cnt.size() == 2 ){
			if (num[0] == 4 ){
				res = yaku[0];	// four card
			}else{
				res = yaku[1];	// full house
			} // end if
		}else
		if (cnt.size() == 3 ){
			if (num[0] == 3 ){
				res = yaku[3];	// three card
			}else
			if (num[0] == 2 ){
				res = yaku[4];	// two pair
			} // end if
		}else
		if (cnt.size() == 4 ){
			res = yaku[5];		// one pair
		}else{
			sort (ALL (card ), greater<int>() );
			bool ok = true;				
			if (card[0]+1 != 13 ){
				rep (i, 4 ){
					if (card[i] == card[i+1] + 1 ) continue;
					ok = false; break;
				} // end rep
			}else{
				if (card[4] + 1 == 1 ) card[4] = 13;
				sort (ALL (card ), greater<int>() );
				rep (i, 4 ){
					if (card[i] == card[i+1] + 1 ) continue;
					ok = false; break;
				} // end rep
			} // end if
			if (ok ){
				res = yaku[2]; 	// straight
			} // end if
		} // end if
		cout << res << endl; 
	} // end loop

//	printf ("%d\n", res );
		
	return 0;
}