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 <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
typedef pair<int,int> pii;

int main() {
	int p[5];
	char c;
	while(cin >> p[0] >> c >> p[1] >> c >> p[2] >> c >> p[3] >> c >> p[4]) {
		int n[13] = {};
		rep(i,5) n[p[i]-1]++;
		bool found = false;

		rep(i,13) if(n[i]==4) {
			cout << "four card" << endl;
			found = true;
		}
		if(found) continue;

		rep(i,13) rep(j,13) if(n[i]==2 && n[j]==3) {
			cout << "full house" << endl;
			found = true;
		}
		if(found) continue;

		rep(i,10) {
			bool ok = true;
			rep(j,5) {
				if(n[(i+j)%13]!=1) {
					ok = false;
				}
			}
			if(ok) {
				cout << "straight" << endl;
				found = true;
			}
		}
		if(found) continue;

		rep(i,13) if(n[i]==3) {
			cout << "four card" << endl;
			found = true;
		}
		if(found) continue;

		int ps = 0;
		rep(i,13) if(n[i]==2) ps++;
		if(ps==2) {
			cout << "two pair" << endl;
		}
		else if(ps==1) {
			cout << "one pair" << endl;
		}
		else {
			cout << "null" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }


int main()
{
	while(true)
	{
		int v[5];
		char k;

		cin >> v[0];
		rep(i, 4)
			cin >> k >> v[i+1];
		if(cin.eof()) break;


		vint n(13, 0);

		rep(i, 5)
			n[v[i]-1]++;

		rep(i, 13)	if(4 <= n[i])
		{
			cout << "four card" << endl;
			goto ng;
		}

		rep(i, 13) rep(j, 13) if(n[i] == 2 && n[j] == 3)
		{
			cout << "full house" << endl;
			goto ng;
		}

		rep(i, 10) if(n[i % 13] == 1 && n[(i+1) % 13] == 1 &&  n[(i+2) % 13] == 1 &&  n[(i+3) % 13] == 1 &&  n[(i+4) % 13] == 1)
		{
			cout << "straight" << endl;
			goto ng;
		}

		rep(i, 13) if(3 <= n[i])
		{
			cout << "three card" << endl;
			goto ng;
		}

		rep(i, 13) REP(j, 1, 13) if(n[i] == 2 && n[j] == 2)
		{
			cout << "two pair" << endl;
			goto ng;
		}

		rep(i, 13) if(n[i] == 2)
		{
			cout << "one pair" << endl;
			goto ng;
		}

		cout << "null" << endl;

ng:
		;
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

string judge(int* nums){
	set<int> st;
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		st.insert(nums[i]);
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	for(auto it=count.begin();it!=count.end();it++){
		if(*it>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(*it==4){
			return "four card";
		}else if(*it==3){
			is3 = true;
		}else if(*it==2){
			if(is3){
				return "full house";
			}else if(is2){
				return "two pair";
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}

int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}

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

int a[5];

string S;

string poker(int p, int q, int r, int s, int t)
{
	if (p == q && q == r && r == s)
	{
		return "four card";
	}
	if (s == t && q == r && r == s)
	{
		return "four card";
	}
	if (p == q && q == r && s == t)
	{
		return "full house";
	}
	if (p == q && r == s && s == t)
	{
		return "full house";
	}
	if (p == q - 1 && q == r - 1 && r == s - 1 && s == t - 1)
	{
		return "straight";
	}
	if (p == 1 && q == 10 && r == 11 && s == 12 && t == 13)
	{
		return "straight";
	}
	if (p == q && q == r)
	{
		return "three card";
	}
	if (r == s && q == r)
	{
		return "three card";
	}
	if (r == s && s == t)
	{
		return "three card";
	}
	if (p == q && r == s)
	{
		return "two pair";
	}
	if (p == q && s == t)
	{
		return "two pair";
	}
	if (q == r && s == t)
	{
		return "two pair";
	}
	if (p == q)
	{
		return "one pair";
	}
	if (q == r)
	{
		return "one pair";
	}
	if (r == s)
	{
		return "one pair";
	}
	if (s == t)
	{
		return "one pair";
	}
	return "null";
}

int main() {
	while (cin >> S)
	{
		int cnt = 0;
		string U = "";
		S += ',';
		for (int i = 0; i < S.size(); i++)
		{
			if (S[i] == ',')
			{
				a[cnt] = stoi(U);
				U = "";
				cnt++;
			}
			else
			{
				U += S[i];
			}
		}
		sort(a, a + 5);
		cout << poker(a[0], a[1], a[2], a[3], a[4]) << endl;
	}
}