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<stdio.h>

int main(void){
	int hand[5];
	int cut_i,cut_j,tem;
	
	while(scanf("%d",&hand[0]) !=EOF){
		for(cut_i=1;cut_i<5;cut_i++){
			scanf(",%d",&hand[cut_i]);
		}

		for(cut_i=0;cut_i<4;cut_i++){
			for(cut_j=cut_i;cut_j<5;cut_j++){
				if(hand[cut_i]>hand[cut_j]){
					tem = hand[cut_i];
					hand[cut_i] = hand[cut_j];
					hand[cut_j] = tem;
				}
			}
		}
		
		if((hand[0] == hand[3]) || ( hand[1] == hand[4])){
			printf("four card\n");
		}
		else if((hand[0] == hand[1] && hand[2] == hand[4]) ||(hand[0] == hand[2] && hand[3] == hand[4])){
			printf("full house\n");
		}
		else if((hand[1]+1 == hand[2]) && (hand[2]+1 == hand[3]) && (hand[3]+1 == hand[4]) &&(((hand[0] ==1) && (hand[4] == 13))||(hand[0]+1 == hand[1]))){
			printf("straight\n");	
		}
		else if((hand[2] == hand[4]) ||(hand[0] == hand[2])){
			printf("three card\n");
		}
		else if( ( ( (hand[0] == hand[1]) && ( (hand[2] == hand[3]) || (hand[3] == hand[4]) ))) ||
			( (hand[1] == hand[2]) &&(hand[3] == hand[4]) ) ){
				printf("two pair\n");
		}
		else if((hand[0] == hand[1]) ||(hand[1] == hand[2])||(hand[2] == hand[3])||(hand[3] == hand[4])){
			printf("one pair\n");
		}
		else {
			printf("null\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <complex>
using namespace std;

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

#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;

inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class T> void preview(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}

const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;

int main() {
	for(string line; cin >> line;) {
		rep(i,line.length()) if(line[i] == ',') line[i] = ' ';
		istringstream is(line);
		vector<int> card(5);
		rep(i,5) is >> card[i];
		sort(all(card));

		map<int, int> m;
		rep(i,5) m[card[i]]++;

		// four cards
		{
			bool four_card = false;
			int two_pair = 0;
			bool three_cards = false;
			each(it, m) {
				if(it->second == 4) four_card = true;
				if(it->second == 3) three_cards = true;
				if(it->second == 2) two_pair++;
			}

			bool streat = true;
			for(int i = 1; i < 5; i++) {
				if(card[i] != card[i - 1] + 1) streat = false;
			}
			if(card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13) streat = true;

			string ans;
			if(four_card) ans = "four card";
			else if(three_cards && two_pair) ans = "full house";
			else if(streat) ans = "straight";
			else if(three_cards) ans = "three card";
			else if(two_pair == 2) ans = "two pair";
			else if(two_pair == 1) ans = "one pair";
			else ans = "null";

			cout << ans << endl;
		}
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int main(){
	int a,b,c,d,e;
	char x;
	while(cin>>a>>x>>b>>x>>c>>x>>d>>x>>e){
		string ans="null";
	int ta[14]={0};
	ta[a]++,ta[b]++,ta[c]++,ta[d]++,ta[e]++;
	int two=0,three=0,four=0;
	for(int i=1;i<=13;i++){if(ta[i]==2)two++;if(ta[i]==3)three++;if(ta[i]==4)four++;}
		if(two==1)ans="one pair";
		if(two==2)ans="double pair";
		if(three==1)ans="three card";
		for(int i=1;i<=13-4;i++)if(ta[i]==1&&ta[i+1]==1&&ta[i+2]==1&&ta[i+3]==1&&ta[i+4]==1)ans="straight";
		
		if(ta[10]==1&&ta[11]==1&&ta[12]==1&&ta[13]==1&&ta[1]==1)ans="straight";
		if(two==1&&three==1)ans="full house";
		if(four==1)ans="four card";
		cout<<ans<<endl;
	}
	return 0;
}