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>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int a,b,c,d,e;
  while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e)!=EOF){
    vi v(14,0);
    v[a]++;
    v[b]++;
    v[c]++;
    v[d]++;
    v[e]++;

    bool ans=false;
    if(v[1]&&v[10]&&v[11]&&v[12]&&v[13]){
      cout<<"straight"<<endl;
      ans=true;
    }
    rep(i,10)
      if(v[i]&&v[i+1]&&v[i+2]&&v[i+3]&&v[i+4]){
	cout<<"straight"<<endl;
	ans=true;
      }
    if(ans)continue;

    int na=0,nb=0,nc=0;
    rep(i,14)
      if(v[i]==2)na++;
      else if(v[i]==3)nb++;
      else if(v[i]==4)nc++;

    if(nc)cout<<"four card"<<endl;
    else if(na&&nb)cout<<"full house"<<endl;
    else if(nb)cout<<"three card"<<endl;
    else if(na==2)cout<<"two pair"<<endl;
    else if(na)cout<<"one pair"<<endl;
    else cout<<"null"<<endl;
  END:;
  }
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int card[5]; char ch;
	while(cin>>card[0]>>ch>>card[1]>>ch>>card[2]>>ch>>card[3]>>ch>>card[4]){
	int num[13]={0};
	for(int i=0;i<5;i++) num[card[i]-1]++;
	string ans="null";
	int pair=0;
	for(int i=0;i<13;i++){
		if(num[i]==2 && pair==0 && ans!="three card") ans="one pair",pair++;
		else if(num[i]==2 && pair==1 && ans!="three card") ans="two pair",pair++;
		else if(num[i]==3) ans="three card";
		else if(num[i]==4) ans="four card";
	};
	if(ans=="three card" && pair==1) ans="full house";
	if(ans=="null") do{
		int flag=0;
		for(int i=0;i<=9;i++){
			if(flag==0 && num[i]==1) flag=1;
			if(flag==1 && num[i+1]==1&& num[i+2]==1 && num[i+3]==1 && num[i+4]==1) ans="straight";
		};
		if(num[9]==1&&num[10]==1&&num[11]==1&&num[12]==1&&num[0]==1) ans="straight";
	}while(0);
	cout << ans << '\n' ;
	};
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <set>
using namespace std;

#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()

int main() {
  int a,b,c,d,e;
   while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e)==5) {
     vector<int> v;
     
     v.push_back(a);
     v.push_back(b);
     v.push_back(c);
     v.push_back(d);
     v.push_back(e);
     sort(ALL(v));

     int aa = count(ALL(v),v[0]);
     int bb = count(ALL(v),v[1]);
     int cc = count(ALL(v),v[2]);
     int dd = count(ALL(v),v[3]);
     
     if (aa == 4 || bb == 4) {
       cout << "four card" << endl;
     } else if (aa==3&&dd==2||aa==2&&cc==3){
       cout << "full house" << endl;
     } else if (v[0]+1==v[1]&&v[1]+1==v[2]&&v[2]+1==v[3]&&v[3]+1==v[4]) {
       cout << "straight" << endl;
     } else if (v[0]==1&&v[1]==10&&v[2]==11&&v[3]==12&&v[4]==13) {
       cout << "straight" << endl;
     } else if (aa==3||bb==3||cc==3) {
       cout << "three card" << endl;
     } else if (aa==2&&cc==2||aa==2&&dd==2||bb==2&&dd==2) {
       cout << "two pair" << endl;
     } else if (aa==2||bb==2||cc==2||dd==2) {
       cout << "one pair" << endl;
     } else
       cout << "null" << endl;
   }

}

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

int main(){
  
  int d[5];
  
  while(scanf("%d,%d,%d,%d,%d",&d[0],&d[1],&d[2],&d[3],&d[4]) != EOF){
    
    sort(d,d+5);
    
    int ans = 0;
    if(d[0] == d[3] || d[1] == d[4]) ans = 7;
    if(!ans && d[0] == d[2] && d[3] == d[4]) ans = 6;
    if(!ans && d[0] == d[1] && d[2] == d[4]) ans = 6;
    if(!ans){
      bool p = false;
      for(int i=0;i<4;i++) if(d[i]+1 != d[i+1]) p = true;
      if(!p) ans = 5;
    }
    if(!ans && d[0] == 1 && d[1] == 10 && d[2] == 11 && d[3] == 12 && d[4] == 13) ans = 5;
    if(!ans && (d[0] == d[2] || d[1] == d[3] || d[2] == d[4])) ans = 4;
    if(!ans){
      int cnt = 0;
      for(int i=0;i<4;i++) if(d[i] == d[i+1]) cnt++;
      if(cnt == 2) ans = 3;
      else if(cnt == 1) ans = 2;
      else if(!cnt) ans = 1;
    }
    
    if(ans == 1) cout << "null";
    else if(ans == 2) cout << "one pair";
    else if(ans == 3) cout << "two pair";
    else if(ans == 4) cout << "three card";
    else if(ans == 5) cout << "straight";
    else if(ans == 6) cout << "hull house";
    else if(ans == 7) cout << "four card";
    cout << endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;
int a[5];
bool is_straight()
{
  for (int i = 1; i < 5; i++) {
    if (a[i] != a[i - 1] + 1) {
      goto next;
    }
  }
  return true;
 next:
  if (a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13) {
    return true;
  }
  return false;
}


int main()
{
  while (scanf("%d" , &a[0]) == 1) {
    for (int i = 1; i < 5; i++) {
      scanf(",%d", &a[i]);
    }
    sort(a, &a[5]);
    /*for (int i = 0; i < 5; i++) {
      printf("%d ", a[i]);
    }
    printf("\n");*/
    vector<int> mx_v;
    int mx = 1;
    bool flag = false;
    for (int i = 1; i < 5; i++) {
      if (a[i] == a[i - 1]) {
	mx++;
	flag = false;
      } else {
	mx_v.push_back(mx);
	mx = 1;
	flag = true;
      }
    }
    if (!flag) mx_v.push_back(mx);
    mx = *max_element(mx_v.begin(), mx_v.end());
    //printf("mx = %d\n", mx);
    if (mx == 1) {
      if (is_straight()) {
	printf("straight\n");
	goto end;
      } else {
	printf("null\n");
	goto end;
      }
    } else if (mx == 2) {
      int c = 0;
      for (int i = 0; i < mx_v.size(); i++) {
	if (mx_v[i] == mx) {
	  c++;
	}
      }
      if (c >= 2) {
	printf("two pair\n");
	goto end;
      } else {
	printf("one pair\n");
	goto end;
      }
    } else if (mx == 3) {
      for (int i = 0;  i< mx_v.size(); i++) {
	if (mx_v[i] == 2) {
	  printf("full house\n");
	  goto end;
	}
	printf("three card\n");
	goto end;
      }
    } else if (mx == 4 || mx == 5) {
      printf("four card\n");
      goto end;
    } else {
      printf("null\n");
      goto end;
    }
  end:;
  }
}