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>
using namespace std;

bool is_four(int cards[5]){
	int num;
	for(int i = 0; i < 2; i++){
		num = cards[i];
		for(int j = 0; j < 4; j++){
			if(cards[i+j] != num) break;
			if(j == 3) return true;
		}
	}
	return false;
}

bool is_full(int cards[5]){
	if(cards[0] == cards[1] && cards[3] == cards[4] 
	&& (cards[2] == cards[0] || cards[2] == cards[4]))
		return true;
	return false;
}

bool is_st(int cards[5]){
	int num = cards[0];
	for(int i = 1; i < 5; i++){
		if(cards[i] != (num + i)) break;
		if(i == 4) return true;
	}
	if(cards[0] == 1 && cards[1] == 10 && cards[2] == 11 
		&& cards[3] == 12 && cards[4] == 13)
		return true;
	return false;
}

bool is_three(int cards[5]){
	int num;
	for(int i = 0; i < 3; i++){
		num = cards[i];
		for(int j = 0; j < 3; j++){
			if(cards[i+j] != num) break;
			if(j == 2) return true;
		}
	}
	return false;
}

bool is_two(int cards[5]){
	int count = 0;
	if(cards[0] == cards[1] || cards[1] == cards[2]) count++;
	if(cards[2] == cards[3] || cards[3] == cards[4]) count++;
	if(count == 2) return true;
	return false;
}

bool is_one(int cards[5]){
	for(int i = 0; i < 4 ; i++){
		if(cards[i] == cards[i+1]) return true;
	}
	return false;
}

int main(){
	int cards[5];
	char c;
	while(cin >> cards[0] >> c >> cards[1] >> c 
		>> cards[2]	>> c >> cards[3] >> c >> cards[4])
	{
		sort(cards, cards + 5);
		if(is_four(cards)){
			cout << "four card" << endl;
		}else if(is_full(cards)){
			cout << "full house" << endl;
		}else if(is_st(cards)){
			cout << "straight" << endl;
		}else if(is_three(cards)){
			cout << "three card" << endl;
		}else if(is_two(cards)){
			cout << "two pair" << endl;
		}else if(is_one(cards)){
			cout << "one pair" << endl;
		}else {
			cout << "null" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int c[5];
	while( scanf("%d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF){
		map<int, int> card;
		int mex = 0;
		for(int i=0;i<5;i++){
			card[ c[i] ]++;
			mex = max( mex, card[ c[i] ] );
		}
		bool full = true;
		bool A = false, B = false;
		for(int i=0;i<5;i++){
			if(c[i]==1) A = true;
			if(c[i]==13) B = true;
		}
		if( A && B ){
			for(int i=0;i<5;i++){
				if(c[i]==1) c[i]=14;
			}
		}
		sort(c, c+5);
		for(int i=0;i<4;i++){
			if(c[i]+1 != c[i+1]) full = false;
		}
		
		// 判定
		if( mex == 4){
			cout<<"four card"<<endl;
		}else if( mex==3 && card.size()==2 ){
			cout<<"full house"<<endl;
		}else if( full ){
			cout<<"straight"<<endl;
		}else if( mex==3){
			cout<<"three card"<<endl;
		}else if( card.size()==3 ){
			cout<<"two pair"<<endl;
		}else if( mex==2 ){
			cout<<"one pair"<<endl;
		}else{
			cout<<"null"<<endl;
		}
		
	}
	return 0;
}

C++: #include <stdio.h>
#include <iostream>
 
using namespace std;
 
int main() {
 
    int a[5];
    int kari;
    char d;
     
    while (cin >> a[0] >> d >> a[1] >> d >> a[2] >> d >> a[3] >> d >> a[4]) {
        for (int i = 4; i > 0; i--) {
            for (int j = 0; j < i; j++) {
                if (a[j] > a[j+1]) {
                    kari = a[j];
                    a[j] = a[j+1];
                    a[j+1] = kari;
                }
            }
        }
        if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3] || a[3] == a[4]) {
            if ((a[0] == a[1] && a[1] == a[2]) || (a[1] == a[2] && a[2] == a[3]) || (a[2] == a[3] && a[3] == a[4])) {
                if (((a[0] == a[1] && a[1] == a[2]) && (a[3] == a[4])) || ((a[0] == a[1]) && (a[2] == a[3] && a[3] == a[4]))) {
                    cout << "full house" << endl;
                } else if ((a[0] == a[1] && a[1] == a[2] && a[2]==a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])){
                    cout << "four card" << endl;
                }else {
                    cout << "three card" << endl;
                }
            } else if ((a[0] == a[1] && a[2] == a[3]) || (a[0] == a[1] && a[3] == a[4]) || (a[1] == a[2] && a[3] == a[4])) {
                if ((a[0] == a[1] && a[1] == a[2] && a[2] == a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])) {
                    cout << "four card" << endl;
                } else {
                    cout << "two pair" << endl;
                }
            } else {
                cout << "one pair" << endl;
            }
        } else if ((a[1] == a[0] + 1 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1) || (a[0]  == 1 && a[1] == 10 && a[2] == a[1] + 1 && a[3] == a[2] + 1 && a[4] == a[3] + 1)){
            cout << "straight" << endl;
        } else {
            cout << "null" << endl;
        }
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

signed main(void)
{
  int a[5];
  while(~scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])) {
    bool s = true;
    sort(a, a+5);
    FOR(i, 1, 5) {
      //cout << a[i-1] << " " << a[i] << endl;
      if(a[i] != a[i-1] + 1) s = false;
    }
    if(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13)
      s = true;

    int cnt[14] = {0};
    REP(i, 5) cnt[a[i]]++;
    int four = 0, three = 0, pair = 0;
    FOR(i, 1, 14) {
      if(cnt[i] == 4) four = 1;
      else if(cnt[i] == 3) three = 1;
      else if(cnt[i] == 2) pair++;
    }
    if(four) {
      cout << "four card" << endl;
    } else if(three && pair) {
      cout << "full house" << endl;
    } else if(s) {
      cout << "straight" << endl;
    } else if(three) {
      cout << "three card" << endl;
    } else if(pair == 2) {
      cout << "two pair" << endl;
    } else if(pair == 1) {
      cout << "one pair" << endl;
    } else {
      cout << "null" << endl;
    }
  }

  return 0;
}