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 <stdio.h>
#include <vector>
#include <string>
#include <algorithm>


using namespace std;

int solve(vector<int> _p, string *result){

	vector <int> cnt(5, 0);
	int max = 0;
	int cnt_pair = 0;

	for (int i = 0; i < 5; i++){
		for (int j = 0; j < 5; j++){
			if (_p[i] == _p[j]){
				cnt[i]++;
				if (cnt[i]>max) max = cnt[i];
			}
		}
	}

	if (max == 4){
		*result = "four card";
	}
	else if (max == 3){
		*result = "three card";
		for (int i = 0; i < 5; i++){
			if (cnt[i] == 2){
				*result = "full house";
				break;
			}
		}
	}
	else if (max == 2){
		*result = "one pair";
		for (int i = 0; i < 5; i++){
			if (cnt[i] == 2){
				cnt_pair++;
			}
		}
		if (cnt_pair == 4){
			*result = "two pair";
		}
	}
	else{
		*result = "straight";
		sort(_p.begin(), _p.end());

		if ((_p[0] + 1 == _p[1]) || (_p[0] == 1 && _p[1] == 10))
			;
		else
			*result = "null";

		for (int i = 1; i < 4; i++){
			if (_p[i]+1 != _p[i+1]){
				*result = "null";
				break;
			}
		}
	}

	//*result = "one pair";
	return 1;
}

int main(){

	int buf;
	char dummy;
	vector<int> p;
	string result;

	while (1){
		for (int i = 0; i < 4; i++){
			if (cin >> buf >> dummy);else return 0;
			p.push_back(buf);
		}
		cin >> buf;
		p.push_back(buf);


		solve(p, &result);
		
		cout << result << endl;

		p.clear();
	}

	return 0;
}

C++: /* AOJ 0038*/

#include<iostream>

using namespace std;

void Swap(int *a,int *b){
	int tmp = *a;
	*a = *b;
	*b = tmp;
}

void BabbleSort(int *data,int n){

	int i,j;
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(data[j] <= data[j-1]){
				Swap(&data[j],&data[j-1]);
			}
		}
	}

}

//onePair or threeCards or fourCards
int isSameCard(int *data){
	
	int tmp[13];

	for(int i=0;i<13;i++){
		tmp[i] = 0;
	}

	for(int i=0;i<5;i++){
		tmp[data[i]-1]++;
	}

	BabbleSort(tmp,13);

	if(tmp[12]==3 && tmp[11] == 2){
		return 6;//フルハウス
	}
	else if(tmp[12] == 4){
		return 7;//フォーカード
	}
	else if(tmp[12] == 3){
		return 4;
	}
	else if(tmp[12] == 2 && tmp[11] == 2){
		return 3;
	}
	else if(tmp[12] == 2){
		return 2;
	}
	else{
		return 1;
	}
}

int isStraight(int *data){
	
	int tmp[13];

	for(int i=0;i<13;i++){
		tmp[i] = 0;
	}

	for(int i=0;i<5;i++){
		tmp[data[i]-1]++;
	}

	if(tmp[9] == 1 && tmp[10] == 1 && tmp[11] == 1 && tmp[12]==1 && tmp[0]==1){
		return 5;
	}
	else{
		for(int i=0;i<13-5;i++){
			if(tmp[i]==1&&tmp[i+1]==1&&tmp[i+2]==1&&tmp[i+3]==1&&tmp[i+4]==1){
				return 5;
			}
		}
	}

	return 1;
}

int main(){

	int data[5];
	char tmp;

	while(cin>>data[0]){
		cin>>tmp;
		cin>>data[1];
		cin>>tmp;
		cin>>data[2];
		cin>>tmp;
		cin>>data[3];
		cin>>tmp;
		cin>>data[4];

		BabbleSort(data,5);

		switch(isSameCard(data)){

		case 7:
			cout<<"four cards"<<endl;
			break;
		case 6:
			cout<<"full house"<<endl;
			break;
		case 4:
			cout<<"three cards"<<endl;
			break;
		case 3:
			cout<<"two pair"<<endl;
			break;
		case 2:
			cout<<"one pair"<<endl;
			break;
		case 1:
			
			if(isStraight(data) == 5){
				cout<<"straight"<<endl;
			}
			else{
				cout<<"null"<<endl;
			}
			break;

		}

	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;



int main() {
    int a, b, c, d, e;
    while(scanf("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF){
        vector<int> v{a, b, c, d, e};
        [&](){
            vector<int> cnt(14);
            for (int i = 0; i < 5; ++i) {
                cnt[v[i]]++;
            }
            int two = 0, three = 0;
            for (int i = 0; i < 14; ++i) {
                if(cnt[i] == 4) {
                    puts("four card");
                    return;
                }else if(cnt[i] == 3) three++;
                else if(cnt[i] == 2) two++;
            }
            if(three && two){
                puts("full house");
                return;
            }
            sort(v.begin(),v.end());
            if(v == vector<int>{1, 10, 11, 12, 13}){
                puts("straight");
                return;
            }
            int ok = 1;
            for (int i = 0; i < 4; ++i) {
                if(v[i]+1 != v[i+1]) ok = 0;
            }
            if(ok){
                puts("straight");
                return;
            }
            if(three) puts("three card");
            else if(two == 2) puts("two pair");
            else if(two) puts("one pair");
            else puts("null");
        }();
    }
    return 0;
}