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
//------------------------------------------
#include <bits/stdc++.h>

using namespace std;

//conversion
//------------------------------------------
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();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

VI n(5, 0);

bool isStraight(){
    int s = 0;
    REP(i, 5) s+=n[i]-n[0]-i;
    if(s == 0) return true;
    else {
        if(n[0] == 1) n[0]+=13;
        SORT(n);

        s = 0;
        REP(i, 5) s+=n[i]-n[0]-i;
        if(s == 0) return true;
        else false;
    }
    return false;
}

int main(){
    while(scanf("%d,%d,%d,%d,%d", &n[0], &n[1], &n[2], &n[3], &n[4])!=EOF){
        int m = 0;
        SORT(n);
        REP(i, 4) FOR(j, i+1, 5) if(n[i]==n[j]) m++;
        switch(m){
            case 1:
                cout << "one pair" << endl;
                break;
            case 2:
                cout << "two pair" << endl;
                break;
            case 3:
                cout << "three card" << endl;
                break;
            case 4:
                cout << "full house" << endl;
                break;
            case 6:
                cout << "four card" << endl;
                break;
            default:
                if(isStraight()) cout << "straight" << endl;
                else cout << "null" << endl;
        }
    }
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
using namespace std;

int main(){
	int hand[5];
	char s[4];
	while(cin >> hand[0] >> s[0] >> hand[1] >> s[1] >> hand[2] >> s[2] >> hand[3] >> s[3] >> hand[4]){
		int trump[14] = {};
		for(int i = 0; i < 5; i++)trump[hand[i]]++;
		for(int i = 1; i <= 10; i++){
			for(int j = 0; j < 5; j++){
				int k = i + j;
				if(k == 14)k = 1;
				if(trump[k] != 1)goto no;
			}
			cout << "straight" << endl;
			goto fin;
			no:;
		}
		sort(trump, trump + 14, greater<int>());
		if(trump[0] == 4){
			cout << "four card" << endl;
			goto fin;
		}else if(trump[0] == 3 && trump[1] == 2){
			cout << "full house" << endl;
			goto fin;
		}else if(trump[0] == 3){
			cout << "three card" << endl;
			goto fin;
		}else if(trump[0] == 2 && trump[1] == 2){
			cout << "two pair" << endl;
			goto fin;
		}else if(trump[0] == 2){
			cout << "one pair" << endl;
			goto fin;
		}
		cout << "null" << endl;
		fin:;
	}
}

C++: #include <stdio.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int c1;
	int c2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		
		c1 = 0;
		c2 = 0;
		straight = 0;
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				c1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				c2++;
			}
		}
		
		if ((c1 == 1 && c2 == 0) || (c1 == 0 && c2 == 1)){
			printf("one pair\n");
		}
		else if (c1 == 1 && c1 == c2){
			printf("two pair\n");
		}
		else if (c1 + c2 == 3 && c1 != 0 && c2 != 0){
			printf("full house\n");
		}
			
		else if (c1 == 2 || c2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13){
			printf("straight\n");
		}
		else if (c1 == 3 || c2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

double eps = 1e-10;

int main() {
	int s[5];
	while(scanf("%d,%d,%d,%d,%d", &s[0], &s[1], &s[2], &s[3], &s[4]) != EOF){
		sort(s, s + 5);
		int cnt[16] = {0};
		for(int i = 0; i < 5; ++i)
			cnt[s[i]]++;
		sort(cnt, cnt + 16, greater<int>());
		if(cnt[0] == 4){
			cout << "four card" << endl;
		}
		else if(cnt[0] == 3 && cnt[1] == 2){
			cout << "full house" << endl;
		}
		else if((s[0] == 1 && s[1] == 2 && s[2] == 3 && s[3] == 4 && s[4] == 5) 
				|| (s[0] == 1 && s[1] == 10 && s[2] == 11 && s[3] == 12 && s[4] == 13)
				|| (s[0] + 1 == s[1] && s[1] + 1 == s[2] && s[2] + 1 == s[3] && s[3] + 1 == s[4])){
			cout << "straight" << endl;	
		}
		else if(cnt[0] == 3){
			cout << "three card" << endl;
		}
		else if(cnt[0] == 2 && cnt[1] == 2){
			cout << "two pair" << endl;
		}
		else if(cnt[0] == 2){
			cout << "one pair" << endl;
		}
		else{
			cout << "null" << endl;
		}
		
	}
	return 0;
}