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<algorithm>
#include<vector>
#include<sstream>
using namespace std;
vector<string> split(const string &str, char delim){
  istringstream iss(str); string tmp; vector<string> res;
  while(getline(iss, tmp, delim)) res.push_back(tmp);
  return res;
}

string paircard(vector<int> card){

		for(int i=0,k;i<5;i++){
			int x = card[i],y; int ansx =1,ansy=1;
			for(k=0;k<5;k++) if(card[k] != x){ y = card[k]; break;};
			for(int j=0;j<5;j++){
				if(i!=j) if(x == card[j]) ansx++;
				if(k!=j) if(y == card[j]) ansy++;
			}
			if(ansx < ansy) swap(ansx,ansy);
			if(ansx == 4)             return "four card";
			if(ansx == 3 && ansy ==2) return "full house";
			if(ansx == 3 && ansy ==1) return "three card";
			if(ansx == 2 && ansy ==2) return "two pair";
			if(ansx == 2 && ansy ==1) return "one pair";
		}
		return "null";
}

bool straight(vector<int> card){
	int ans = 1;
	if(card[0] == 1){
			for(int i=0;i+1<4;i++){
				if(card[1]+i+1 == card[i+2]) ans++;
			}
			if(card[4] == 13 && ans == 4) return true;
		}
	ans = 1;
	for(int i=0;i+1<5;i++){
		if(card[0]+i+1 == card[i+1]) ans++;
	}
	if(ans==5) return true;

	return false;
}


string poker(vector<int> card){

 	if(straight(card)){return "straight";}

	return paircard(card);
}


int main(){
	string str; vector<string> st; vector<int> card;
	while(cin >> str){
		st = split(str,',');
		for(int i=0;i<5;i++){
			stringstream ss; int a;
			ss << st[i];
			ss >> a;
			card.push_back(a);
		}
		sort(card.begin(),card.end());
		cout << poker(card) << endl;
		card.clear();
	}
}

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	vector<int> card(5);
	char c;
	while (cin >> card[0] >> c >> card[1] >> c >> card[2] >> c >> card[3] >> c >> card[4]){
		SORT(card);
		int pair = 0;
		for (int i = 0; i < 4;i++){
			for (int j = i + 1; j < 5; j++){
				if (card[i] == card[j])
					pair++;
			}
		}
		bool st = true;
		REP(i, 4){
			if (card[i] + 1 != card[i + 1])
				st = false;
		}
		if (card[0] == 1 && card[1] == 10 && pair == 0)
			st = true;
		if (pair == 6)
			cout << "four card" << endl;
		else if (pair==4)
			cout << "full house" << endl;
		else if (st )
			cout << "straight" << endl;
		else if (pair==3 )
			cout << "three card" << endl;
		else if (pair==2 )
			cout << "two pair" << endl;
		else if (pair==1 )
			cout << "one pair" << endl;
		else
			cout << "null" << endl;
	}
}

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

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

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

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

		int cnt = 0, flag = true, card[13] = {}, max = 4;
		sort(hand, hand + 5);
		/*for (int i = 0; i < 5; i++){
			printf("%d ", hand[i]);
		}
		puts("");*/
		for (int i = 0; i < 4; i++){
			for (int j = i + 1; j < 5; j++){
				if (hand[i] == hand[j]){
					cnt++;
				}
			}
		}
		//printf("%d\n", cnt);
		int i = 0;
		if (hand[i] == 1 && hand[i + 1] == 10){
			//printf("!!!!!!!\n");
			i = 1;
			max = 5;
			hand[5] = 14;
		}
		for (; i < max; i++){
			if (hand[i] + 1 != hand[i + 1]){
				flag = false;
			}
		}
		if (cnt == 6){
			printf("four card\n");
		}
		else if (cnt == 4){
			printf("full house\n");
		}
		else if (flag){
			printf("straight\n");
		}
		else if (cnt == 3){
			printf("three card\n");
		}
		else if (cnt == 2){
			printf("two pair\n");
		}
		else if (cnt == 1){
			printf("one pair\n");
		}
		else{
			printf("null\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    int c[5];
    while(true){
        if(!(cin>>c[0])) break;
        for(int i=1; i<5; i++){
            cin.ignore();
            cin>>c[i];
        }
        sort(c, c+5);
        int pair[5]={1};
        int *p=pair;
        for(int i=1; i<5; i++){
            if(c[i-1]==c[i]) ++*p;
            else *(++p)=1;
        }
        sort(pair, pair+5, greater<int>());
        if(pair[0]==4) cout<<"four card\n";
        else if(pair[0]==3&&pair[1]==2) cout<<"full house\n";
        else if(c[1]-c[0]==1&&c[2]-c[1]==1&&c[3]-c[2]==1&&c[4]-c[3]==1) cout<<"straight\n";
        else if(c[0]==1&&c[1]==10&&c[2]==11&&c[3]==12&&c[4]==13) cout<<"straight\n";
        else if(pair[0]==3) cout<<"three card\n";
        else if(pair[0]==2&&pair[1]==2) cout<<"two pair\n";
        else if(pair[0]==2) cout<<"one pair\n";
        else cout<<"null\n";
    }
    return 0;
}