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<cstdio>
#include<algorithm>
using namespace std;

enum Form{null,oneP,twoP,threeC,straight,fullHouse,fourC};

int main()
{
    int card[5];
    bool cardFlag[5];
    while(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) != EOF){
        int cnt=0;
        Form f=null;
        for(int i=0;i<5;i++){
            cardFlag[i]=false;
        }
        sort(card,card+5);
        for(int i=0;i<5;i++){
            if(i!=0){
                if(card[i-1]==card[i]){
                    cardFlag[i-1]=true;
                    cardFlag[i]=true;
                }
            }
            if(i==4){
                for(int j=0;j<5;j++){
                    if(cardFlag[j]){
                        cnt++;
                    }
                }
            }
        }
        if(cnt>0){
            switch(cnt){
                case  2:
                    f=oneP;
                    break;
                case  3:
                    f=threeC;
                    break;
                case  4:
                    if(card[1]!=card[3]){
                        f=twoP;
                    }
                    else{
                        f=fourC;
                    }
                    break;
                case  5:
                    f=fullHouse;
                    break;
            }
        }
        else{
            if(card[1]+1==card[2] && card[2]+1==card[3] &&card[3]+1==card[4]){
                if(card[0]+1==card[1]) f=straight;
                else if(card[0]==1 && card[4]==13) f=straight;
            }
        }
        switch(f){
            case null :
                cout<<"null"<<endl;
                break;
            case oneP :
                cout<<"one pair"<<endl;
                break;
            case twoP :
                cout<<"two pair"<<endl;
                break;
            case threeC :
                cout<<"three card"<<endl;
                break;
            case straight :
                cout<<"straight"<<endl;
                break;
            case fullHouse :
                cout<<"full house"<<endl;
                break;
            case fourC :
                cout<<"four card"<<endl;
                break;
        }
    }
    return 0;
}

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

int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full 

house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
for(int j=i-1;j>-1;j--){
if(s[j]<=c[i]){
for(int k=i;k>j+1;k--)s[k]=s[k-1];
s[j+1]=c[i];
break;}}
if(s[0]>c[i]){
for(int k=i;k>0;k--)s[k]=s[k-1];
s[0]=c[i];}}
if(s[0]==s[1]||s[1]==s[2]||s[3]==s[4]||s[2]==s[3])ans=1;
if((s[0]==s[1]||s[1]==s[2])&&(s[2]==s[3]||s[3]==s[4]))ans=2;
if(s[0]==s[2]||s[1]==s[3]||s[2]==s[4])ans=3;
if(s[2]+1==s[3]&&s[1]+1==s[2]&&s[3]+1==s[4]&&(s[0]+1==s[1]||(s[0]==1&&s

[4]==13)))ans=4;
if((s[0]==s[2]&&s[3]==s[4])||(s[0]==s[1]&&s[2]==s[4]))ans=5;
if(s[0]==s[3]||s[1]==s[4])ans=6;

for(int i=0;i<7;i++){if(ans==i)cout<<a[i]<<endl;}

}

}

C++: #include<cstdio>
#include<cmath>
#include <stdlib.h>
#include<algorithm>

using namespace std;

int main(){
	int p[5],pair[5],str[5],che[5];
	while( scanf("%d,%d,%d,%d,%d",&p[0],&p[1],&p[2],&p[3],&p[4]) != EOF ){
		sort(p,p+5);
		pair[0]=0;
		str[0]=0;
		che[0]=0;
		for(int i=1;i<5;i++){
			if(p[i]==p[i-1]){
				pair[i] = pair[i-1]+1;
			}
			else{
				pair[i]=0;
			}
			if(p[i-1]+1==p[i]){
				str[i] = str[i-1]+1;
			}
			else{
				str[i] = 0;
			}
			che[i]=0;
		}
		if(p[0]==1&&p[4]==13)str[4]++;
		for(int i=0;i<5;i++){
			che[pair[i]]++;
		}
		if(che[3]==1){
			printf("four card\n");
		}
		else if(che[2]==1&&che[1]==2){
			printf("full house\n");
		}
		else if(str[4]==4){
			printf("straight\n");
		}
		else if(che[2]==1){
			printf("three card\n");
		}
		else if(che[1]==2){
			printf("two pair\n");
		}
		else if(che[1]==1){
			printf("one pair\n");
		}
		else{
			printf("null\n");
		}
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<map>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

const char *name[] = {
  "null",
  "one pair",
  "two pair",
  "three card",
  "straight",
  "full house",
  "four card"
};

int main(){
  int c[5];
  while(~scanf("%d,%d,%d,%d,%d",c,c+1,c+2,c+3,c+4)){
    int cnt[14] = {0};
    int yaku = 0;
    int cnt2[5] = {0};
    sort(c, c+5);
    REP(i,5) cnt[c[i]]++;
    REP(i,14) cnt2[cnt[i]]++;
    if(cnt2[2] == 1) yaku = 1;
    if(cnt2[2] == 2) yaku = 2;
    if(cnt2[3] == 1) yaku = 3;
    if(c[1]==c[0]+1&&
       c[2]==c[1]+1&&
       c[3]==c[2]+1&&
       c[4]==c[3]+1)
      yaku = 4;
    if(c[0]==1  &&
       c[1]==10 &&
       c[2]==11 &&
       c[3]==12 &&
       c[4]==13)
      yaku = 4;
    if(cnt2[2] == 1 && cnt2[3] == 1)
      yaku = 5;
    if(cnt2[4] == 1)
      yaku = 6;
    puts(name[yaku]);
  }
  return 0;
}