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 <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())

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

using namespace std;
int main(void)
{
  for(;;){
    int n[5];
    char c;
    REP(i,5){
      if(i) cin >> c;
      if((cin >> n[i]) == 0) return 0;
    }
    int num[16];
    REP(i,16) num[i]=0;
    REP(i,5) ++num[n[i]];
    num[14]=num[1];
    string s="null";
    REP(i,11){
      int st=0;
      REP(j,5) if(num[i+j]) ++st;
      if(st==5) s="straight";
    }
    int pa=0;
    REP(i,5) REP(j,i) if(n[i]==n[j]) ++pa;
    if(pa==1) s="one pair";
    if(pa==2) s="two pair";
    if(pa==3) s="three card";
    if(pa==4) s="full house";
    if(pa==6) s="four card";
    cout << s << endl;



  }
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
//#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

int main(){
  int a,b,c,d,e;
  char x;
  while(cin>>a>>x>>b>>x>>c>>x>>d>>x>>e){
    int num[14]={};
    num[a]++;num[b]++;num[c]++;num[d]++;num[e]++;
    int M_NUM=*max_element(num,num+14);
    bool key=false;
    loop(i,1,10)if(num[i]==1&&num[i+1]==1&&num[i+2]==1&&num[i+3]==1&&num[i+4]==1)key=true;
    if(num[1]==1&&num[13]==1&&num[12]==1&&num[11]==1&&num[10]==1)key=true;
    if(key){
      cout<<"straight"<<endl;
      goto at;
    }
    if(M_NUM==4){
      cout<<"four card"<<endl;
      goto at;
    }else if(M_NUM==3){
      bool flag=false;
      rep(i,14)if(num[i]==2)flag=true;
      if(flag){
        cout<<"full house"<<endl;
        goto at;
      }else{
        cout<<"three card"<<endl;
        goto at;
      }
    }else if(M_NUM==2){
      int p=0;
      rep(i,14)if(num[i]==2)p++;
      if(p==2){
        cout<<"two pair"<<endl;
        goto at;
      }else{
        cout<<"one pair"<<endl;
        goto at;
      }
    }else{
      cout<<"NULL"<<endl;
    }
    at: ;
  }
  return 0;
}

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

int main()
{
	int card[5];
	
	while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
	 	
		int a[20];
		memset( a, 0, sizeof( a ) );
		int c = 0;
		
		for( int i = 0; i < 5; i++ ) a[card[i]]++;
		
		for( int i = 0; i < 5; i++ ){
			 c = std::max( c, (int)std::count( card, card + 5, card[i] ) );
		}
		
		bool f = false, f2 = false;
		int m;
		
		switch( c ){
			case 4:
		 		puts( "four card" );
				break;
			case 3:
				for( int i = 0; i < 5; i++ ){
			 		if( std::count( card, card + 5, card[i] ) == 2 ){
						f = true; 
						break;
					}
				}
				
				if( f ){
				 	puts( "full house" );
				}
				else{
				 	puts( "three card" );
				}
				break;
			case 2:
				for( int i = 0; i < 5; i++ ){
					if( std::count( card, card + 5, card[i] ) == 2 && !f ){
					 	m = card[i];
						f = true;
					}
					if( card[i] != m && std::count( card, card + 5, card[i] ) == 2 && f ){
						puts( "two pair" );
						f2 = true;
						break;
					}
				}
				if( !f2 ) puts( "one pair" );
				break;
			case 1:	
				for( int i = 1; i <= 10; i++ ){
					if( a[i] == 1 && a[i+1] == 1 && a[i+2] == 1 && a[i+3] == 1 && a[(i+4)%13] == 1 ) f = true;
				}
				
				if( f ){
				 	puts( "straight" );
				}
				else{
					puts( "null" );
				}
				
				break;
		}

	}

 	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;

int main(){
int n[5]={};
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;}
}

for(int i=0;i<4;i++){
if(n[i+1]!=(n[i]+1))f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc==1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2||cc==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");
else printf("null\n");

c=0,cc=0;f=true;
}
return 0;
}

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

int main()
{
  vector<int> cards(5);
  while (~scanf("%d,%d,%d,%d,%d",
		&cards[0], &cards[1], &cards[2], &cards[3], &cards[4])) {
    sort(cards.begin(), cards.end());

    vector<int> cnt(15, 0);
    for (unsigned int i = 0; i < cards.size(); ++i)
      ++cnt[cards[i]];

    sort(cnt.begin(), cnt.end(), greater<int>());
    if (cnt[0] == 4) {
      cout << "four card" << endl;
    } else if (cnt[0] == 3 && cnt[1] == 2) {
      cout << "full house" << endl;
    } else {
      bool straight = true;
      for (unsigned int i = 1; i < cards.size(); ++i) {
	if (cards[i-1]+1 != cards[i])
	  straight = false;
      }

      if (straight ||
	  (cards[0] == 1 && cards[1] == 10 && cards[2] == 11 && cards[3] == 12 && cards[4] == 13)) {
	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;
}