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 <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

string judge(int* nums){
	set<int> st;
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		st.insert(nums[i]);
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	foreach(it,count){
		if(*it>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(*it==4){
			return "four card";
		}else if(*it==3){
			is3 = true;
		}else if(*it==2){
			if(is3){
				return "full house";
			}else if(is2){
				return "two pair";
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}

int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << 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[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<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a;  i ++)
int main(void){
  vector<int> array(5);
  vector<int> original;
  vector<int> card(15);
  string s;  
  while(cin>>s){
    rep(i,5)array[i]=0;
    rep(i,15)card[i]=0;
    for(int i = 0, j = 0 ; i < s.size() ; i ++){
      if(s[i] == ','){
	j++;continue;
      }
      array[j] = array[j] * 10 +s[i]-'0';
    }
    rep(i,5){
      card[array[i]]++;
      if(array[i] == 1)card[14]++;
    }

    original = card;
    sort(card.begin(),card.end(),greater<int>());
    
    //rep(i,5)cout<<card[i]<<endl;
    if(
       (card[0 ] == 1 && card[1 ] == 1 && card[2 ] == 1 && card[3 ] == 1 && card[4] == 1 ) 
       ){
      int cnt = 0;
      rep(i,15){
	//cout<<original[i]<<" "<<cnt<<endl;;
	if(cnt == 4) break;
	if(original[i] == original[i+1] && original[i] != 0 )cnt ++;
	else cnt = 0;
      }
      if(cnt == 4)cout<<"straight"<<endl;
      else cout<<"null"<<endl;
     
      continue;
    }
    sort(array.begin(),array.end());
    switch(card[0]){
    case 4:
      cout<<"four card"<<endl;break;
    case 3:
      if(card[1]==2){
	cout<<"full house"<<endl;
      }else{
	cout<<"three card"<<endl;
      }
      break;
    case 2:
      // rep(i,card.size())cout<<original[i]<<endl;
      if(card[1]==2 && card[2] == 2){
	cout<<"two pair"<<endl;
      }else{
	cout<<"one pair"<<endl;
      }
      break;
    default:
      cout<<"null"<<endl;
    }
  }
}

C++: #include<iostream>
#include<string>
using namespace std;
int t[15],in[5],twoC,threeC,fourC,flg;


string solve(){
	
	for(int i=0;i<15;i++)t[i]=0;
	for(int i=0;i<5;i++){
		t[in[i]]++;
		if(in[i]==1)t[14]++;
	}
	flg=twoC=threeC=fourC=0;
	for(int i=1;i<=13;i++){
		if(t[i]==4)fourC++;
		if(t[i]==3)threeC++;
		if(t[i]==2)twoC++;
	}
	if(fourC)return "four card";
	if(threeC&&twoC) return "full house";

	
	for(int i=1;i<=14;i++){
		if(t[i]>0)flg++;
		else flg=0;
		if(flg==5)return "straight";
	}
	
	if(threeC)return "three card";
	if(twoC==2)return "two pair";
	if(twoC==1)return "one pair";
	
	return "null";
}

int main(){
	char ch;
	while(cin>>in[0]>>ch>>in[1]>>ch>>in[2]>>ch>>in[3]>>ch>>in[4]){
	
		string str=solve();
		cout<<str<<endl;
	}
	return 0;
}