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;

int main(){
  int a[6],c[5]={0};
  int i,count=0;
  char x;
  while(cin>>a[0]){
    if(a[0]==1)a[5]+=14;
    for(i=1;i<5;i++){
      cin>>x>>a[i];
      if(a[i]==1)a[5]=14;
    }
    
    c[0]=c[1]=c[2]=c[3]=c[4]=0;
    sort(&a[0],&a[5]);
			
    for(i=0;i<5;i++)
      if(a[i]==a[i+1])c[0]++; else break;
    for(i=i+1;i<5;i++)
      if(a[i]==a[i+1])c[1]++; else break;
    for(i=i+1;i<5;i++)
      if(a[i]==a[i+1])c[2]++; else break;
    for(i=i+1;i<5;i++)
      if(a[i]==a[i+1])c[3]++; else break;
    
    if(c[0]==0&&c[1]==0&&c[2]==0&&c[3]==0){
      for(i=0;i<4;i++)
	if(a[i]+1==a[i+1]){
	  count++;
	}else {
	  break;
	}
      if(count==4)c[4]=1;
      count=0;
      
      if(c[4]!=1){
	for(i=1;i<6;i++)
	  if(a[i]+1==a[i+1]){
	    count++;
	  }else {
	    break;
	  }
	if(count==4)c[4]=1;
	count=0;
      }
    }
    sort(c,c+4,greater<int>());
    if(c[0]==2&&c[1]==1)cout<<"full house";
    else if(c[0]==1&&c[1]==1)cout<<"two pair";
    else if(c[0]==1)cout<<"one pair";
    else if(c[0]==2)cout<<"three card";
    else if(c[0]==3)cout<<"four card";
    else if(c[0]==4)cout<<"five card";
    else if(c[4]==1)cout<<"straight";
    else cout<<"null";
    cout<<endl;
    a[5]=0;
  }  
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int main(){
	int a,b,c,d,e;
	char x;
	while(cin>>a>>x>>b>>x>>c>>x>>d>>x>>e){
		string ans="null";
	int ta[14]={0};
	ta[a]++,ta[b]++,ta[c]++,ta[d]++,ta[e]++;
	int two=0,three=0,four=0;
	for(int i=1;i<=13;i++){if(ta[i]==2)two++;if(ta[i]==3)three++;if(ta[i]==4)four++;}
		if(two==1)ans="one pair";
		if(two==2)ans="double pair";
		if(three==1)ans="three card";
		for(int i=1;i<=13-5;i++)if(ta[i]==1&&ta[i+1]==1&&ta[i+2]==1&&ta[i+3]==1&&ta[i+4]==1)ans="straight";
		
		if(ta[10]==1&&ta[11]==1&&ta[12]==1&&ta[13]==1&&ta[1]==1)ans="straight";
		if(two==1&&three==1)ans="full house";
		if(four==1)ans="four card";
		cout<<ans<<endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>

using namespace std;

int main(){

	int card[4];
	char c;

	while(cin >> card[0] ){
		for(int i=1;i<5;i++){
			cin >> c >> card[i];
		}
		sort(card, card+5);

		int two = 0;
		bool three = 0;
		bool four = 0;

		for(int i=0;i<5;i++){
			int count = 1;
			for(int j=i+1;j<5;j++){
				if(card[i]==card[j]){
					count++;
				}
				else{
					break;
				}
			}
			if(count==2){
				two+=1;
				i+=1;
			}
			else if(count==3){
				three=1;
				i+=2;
			}
			else if(count==4){
				four=1;
				i+=3;
			}
		}

		if(two && three){
			cout << "full house" << endl;
		}else if(two==2){
			cout << "two pair" <<endl;
		}else if(two==1){
			cout << "one pair" <<endl;
		}else if(three){
			cout << "three card" <<endl;
		}else if(four){
			cout << "four card" <<endl;
		}else{
			bool straight_flag = 1;
			bool ace_flag = 1;
			bool has_13 = 0;
			if(card[4]==13){
				has_13=1;
			}

			for(int i=3;i>=0;i--){
				if(ace_flag && card[i+1]-1==card[i]){
					//cout<<1;
				}else if(ace_flag && has_13 && card[i]==i+1){
					//cout<<0;
					ace_flag=0;
				}else{
					straight_flag=0;
					break;
				}
			}

			if(straight_flag){
				cout << "straight" << endl;
			}else{
				cout << "null" << endl;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>

using namespace std;

class poker{
private:
	int cardCnt[13];
	string audit;
	bool onePair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 1;
	}
	bool twoPair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 2;
	}
	bool threeCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				return true;
			}
		}
		return false;
	}
	bool straight(){
		const int exception[] = {1,0,0,0,0,0,0,0,0,1,1,1,1};
		for(int i = 0;i < 9;i++){
			if(cardCnt[i] == 1 && cardCnt[i + 1] == 1 && cardCnt[i + 2] == 1 && cardCnt[i + 3] == 1 && cardCnt[i + 4] == 1){
				return true;
			}
		}
		for(int i = 0;i < 13;i++){
			if(exception[i] != cardCnt[i]){
				return false;
			}
		}
		return true;
	}
	bool fullHouse(){
		bool b1 = false, b2 = false;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				b1 = true;
			}else if(cardCnt[i] == 2){
				b2 = true;
			}
		}
		return b1 && b2;
	}
	bool fourCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 4){
				return true;
			}
		}
		return false;
	}
public:
	string getAudit(){
		return audit;
	}
	poker(int c[5]){
		for(int i = 0;i < 13;i++){
			cardCnt[i] = 0;
		}
		for(int i = 0;i < 5;i++){
			cardCnt[c[i] - 1]++;
		}
		if(fourCard()){
			audit = "four card";
		}else if(fullHouse()){
			audit = "full house";
		}else if(straight()){
			audit = "straight";
		}else if(threeCard()){
			audit = "three card";
		}else if(twoPair()){
			audit = "two pair";
		}else if(onePair()){
			audit = "one pair";
		}else{
			audit = "null";
		}
	}
};

int main(void){
	int crd[5];
	while(1){
		if(cin.eof()){
			break;
		}
		for(int i = 0;i < 5;i++){
			cin >> crd[i];
			cin.get();
		}
		poker p(crd);
		cout << p.getAudit() << endl;
	}
	return 0;
}