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 <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() {
	while (!cin.eof()){
		vector<int> card(5);
		char c;
		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 <stdio.h>
 
int hantei(int[5]);
 
int main(void) {
    int cards[5];
    int i,j,temp;
    int yaku;
    char yakuname[7][11]={"null","one pair","two pair","three card",
                        "straight","full house","four card"};
    while(1) {
        if(scanf("%d,%d,%d,%d,%d",
            &cards[0],&cards[1],&cards[2],&cards[3],&cards[4])==-1)break;
        for(i=4;i>0;i--) {
            for(j=0;j<i;j++) {
                if(cards[j]>cards[j+1]) {
                    temp=cards[j];
                    cards[j]=cards[j+1];
                    cards[j+1]=temp;
                }
            }
        }

        yaku=0;

		if(cards[1]==cards[2] && cards[2]==cards[3]) {
            if(cards[0]==cards[1] || cards[3]==cards[4]){
					yaku=6;
			}
            else{ 
				yaku=3;
			}
        } 
		else if(cards[0]==cards[1] && cards[1]==cards[2]) 
		{
            if(cards[3]==cards[4]){
				yaku=5;
			}
			else{
				yaku=3;
			}

        } 
		else if(cards[2]==cards[3] && cards[3]==cards[4]) {
            if(cards[0]==cards[1]){
				yaku=5;
			}
			else{
				yaku=3;
			}
        } 
		else if(hantei(cards)){
			yaku=4;
		}
        else {
            for(i=0;i<4;i++) {
                if(cards[i]==cards[i+1]){
					yaku++;
				}
            }
        }
        printf("%s\n",yakuname[yaku]);
    }
    return 0;
}
 
int hantei(int cards[5]) {
    int i;
    for(i=0;i<4;i++) {
        if(cards[i]+1!=cards[i+1]){
			break;
		}
    }
    if(i<4) {
        if(cards[0]==1 && cards[1]==10 && cards[2]==11 &&
            cards[3]==12 && cards[4]==13){
				return 1; 
		}
		else{
			return 0;
		}
    } 
	else{ 
		return 1;
	}
}

C++: using namespace std;
#include <iostream>
#include <string>
#include <set>
#include <functional>
#include <vector>
#include <algorithm>
#include <stdio.h>
string s;
string solve(){
	int card[5]={},t=0,num[14]={};
	for(int i=0;i<(int)s.length();i++){
		if(s[i]==',')t++;
		else card[t]=card[t]*10+s[i]-'0';
	}
	//for(int i=0;i<5;i++)cout<<card[i]<<endl;
	for(int i=0;i<5;i++)num[card[i]]++;
	sort(num,num+14,greater<int>());
	if(num[0]==4)return "four card";
	else if(num[0]==3&&num[1]==2)return "full house";
	else if(num[0]==3)return "three card";
	else if(num[0]==2&&num[1]==2)return "two pair";
	else if(num[0]==2)return "one pair";
	else{
		sort(card,card+5);
		if(card[0]==1&&card[1]==10&&card[2]==11&&card[3]==12&&card[4]==13)return "straight";
		for(int i=0;i<4;i++){
			if(card[i+1]-card[i]!=1)return "null";
		}
		return "straight";
	}
}
int main()
{
	while(getline(cin,s)){
		cout<<solve()<<endl;
	}
    return 0;
}

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

int main() {
  int x;
  while(scanf("%d",&x)==1) {
    int a[15];
    fill(a,a+14,0);
    a[x]++;
    for(int i=0; i<4; i++) {
      scanf("%*c%d",&x);
      a[x]++;
    }
    int z=1,cnt=0;
    for(int i=1; i<14; i++) {
      if(a[i]==2) {
	if(z==1) z=2;
	else if(z==2) z=3;
	else if(z==4) z=6;
      }
      if(a[i]==3) {
	if(z==1) z=4;
	else if(z==2) z=6;
      }
      if(a[i]==4) {
	z=7;
      }
      if(a[i]==1) {
	cnt++;
      } else cnt=0;
      if(cnt==5) z=5;
    }
    if(cnt==4 && a[1]==1) z=5;

    if(z==1) cout << "null" << endl;
    if(z==2) cout << "one pair" << endl;
    if(z==3) cout << "two pair" << endl;
    if(z==4) cout << "three card" << endl;
    if(z==5) cout << "straight" << endl;
    if(z==6) cout << "full house" << endl;
    if(z==7) cout << "four card" << endl;
  }
  return 0;
}