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;

int main()
{
	vector<int> H(5);
		while(~scanf("%d,%d,%d,%d,%d", &H[0] ,&H[1] ,&H[2] ,&H[3] ,&H[4]))
		{
			vector<int> L(32, 0);
			int kind = 0;
			for(int i = 0; i < 5; i++)
			{
				if(L[H[i]-1] == 0)
				{
					kind++;
				}
				L[H[i]-1]++;
			}

			if(kind == 2)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 4)
				{
					cout << "four pair" << endl;
					continue;
				}
				else if(mx == 3)
				{
					cout << "full house" << endl;
					continue;
				}
				cout << "error 1" << endl;
			}
			else if(kind == 5)
			{
				bool straight = false;
				for(int i = 0; i <= 10; i++)
				{
					L[13] = L[0];
					if(L[i] && L[i+1] && L[i+2] && L[i+3] && L[i+4])
					{
						straight = true;
					}
				}
				if(straight)
				{
					cout << "straight" << endl;
					continue;
				}
				else
				{
					cout << "null" << endl;
					continue;
				}
			}
			else if(kind == 3)
			{
				int mx = *max_element(L.begin(), L.end());
				if(mx == 3)
				{
					cout << "three card" << endl;
					continue;
				}
				else if(mx == 2)
				{
					cout << "two pair" << endl;
					continue;
				}
			}
			else if(kind == 4)
			{
				cout << "one pair" << endl;
				continue;
			}
		}
}

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




int main(){
  int c[6];

  while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
    map<int,int> card;
    int mex = 0;
    for(int i=0;i<5;i++){
      card[c[i]]++;
      mex = max(mex,card[c[i]]);
    }
    sort(c,c+4);
    bool full = true;
    bool A,B;
    A = B = false;
    for(int i=0;i<5;i++){
      if(c[i] == 13)A = true;
      if(c[i] == 1)B = true;
    }
    if(A && B){
      for(int i=0;i<5;i++){
	if(c[i] == 1){
	  c[i] = 14;
	  break;
	}
      }
      sort(c,c+5);
   
    }
    for(int i=0;i<4;i++){
      if(c[i]+1 != c[i+1]){
	full = false;
	break;
      }
    }


    if(mex == 4){
      cout << "four card" << endl;
    }
    else if(mex == 3 && card.size() == 2){
      cout << "full house" << endl;
    }
    else if(full){
      cout << "straight" << endl;
    }
    else if(mex == 3){
      cout << "three card" << endl;
    }
    else if(card.size() == 3){
      cout << "two pair" << endl;
    }
    else if(mex == 2){
      cout << "one pair" << endl;
    }
    else cout << "null" << endl;


  }
  return 0;
}

C++: #include <string>
#include <iostream>
#include <map>
#include <cstdio>

using namespace std;

int main(){
	int hand[5];

	while(~scanf("%d", &hand[0])){
		for(int i = 1; i < 5; i++){
			scanf(",%d", &hand[i]);
		}
		int num[15] = {0};

		for(int i = 0; i < 5; i ++){
			if(hand[i] == 1){
				hand[i] += 13;
			}
			num[hand[i]]++;
		}

		int h[7] = {0};
		string s[] = {"null", "one pair", "two pair", "three card", "straight", "full house", "four card"};
		int seq = 0;

		h[0] = 1;
		for(int i = 2; i < 15; i++){
			if(num[i-1] && num[i]){
				seq++;
			}
			if(num[i] == 2){
				h[1] ++;
			}
			if(num[i] == 3){
				h[3]++;
			}
			if(num[i] == 4){
				h[6]++;
			}
		}
		if(h[1] > 1){
			h[2]++;
		}
		if(h[1] && h[3]){
			h[5]++;
		}
		if(seq == 4){
			h[4]++;
		}

		for(int i = 6; i >= 0; i--){
			if(h[i]){
				cout << s[i] << endl;
				break;
			}
		}
	}


	return 0;
}

C++: afga

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <memory.h>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main() {
	char c;
	for (int a[5]; cin >> a[0]; ) {
		rep(i, 4) cin >> c >> a[i + 1];
		sort(a, a + 5);
		map<int, int> d;
		rep(i, 5) d[a[i]]++;
		int b[6];
		memset(b, 0, sizeof(b));
		tr(i, d) b[i->snd]++;
		if (b[4]) cout << "four card" << endl;
		else if (b[3] && b[2]) cout << "full house" << endl;
		else if (b[1] >= 4) {
			bool flg = true;
			rep(i, 4) if (a[i] + 1 != a[i + 1]) flg = false;
			if (flg) cout << "straight" << endl;
			else {
				flg = true;
				rep(i, 3) if (a[i + 1] + 1 != a[i + 2]) flg = false;
				if (flg && a[4] == 13 && a[0] == 1) cout << "straight" << endl;
				else cout << "null" << endl;
			}
		}
		else if (b[3]) cout << "three card" << endl;
		else if (b[2] == 2) cout << "two pair" << endl;
		else if (b[2] == 1) cout << "one pair" << endl;
		else cout << "null" << endl;
		
	}
	
	return 0;
}