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 <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <numeric>
*/
#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define rrep()
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int gcd(int a,int b){
    if(a<b)swap(a,b);
    int k=a%b;
    while(k!=0){
        a=b;
        b=k;
        k=a%b;
    }
}

int lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

int main(){
    char c; int x;
    int v[13]={};
    while(cin>>x){
        bool st=false;
    v[x-1]++;
    rep(i,1,5){
        cin>>c;
        cin>>x;
        v[x-1]++;
    }
    
    rep(i,0,10){
        bool str=true;
        rep(j,0,5){
            int ni=i+j;
            ni%=13;
            if(v[i]!=v[ni] || v[i]!=1)str=false;
        }
        if(str){
            cout<<"straight"<<endl;
            st=true;
        }
    }
    
    int two=0,three=0,four=0;
    rep(i,0,13){
        if(v[i]==2)two++;
        if(v[i]==3)three++;
        if(v[i]==4)four++;
    }
    
    if(four)cout<<"four card"<<endl;
    else if(two && three)cout<<"full house"<<endl;
    else if(three)cout<<"three card"<<endl;
    else if(two==2)cout<<"two pair"<<endl;
    else if(two)cout<<"one pair"<<endl;
    else if(!st)cout<<"null"<<endl;
    
    fill(v,v+13,0);
    }
    return 0;
}

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

using namespace std;

int main(void){
  int x[5],card[14],fg[5],i;
  vector<int>y;
  while(~scanf("%d,%d,%d,%d,%d"
	       ,&x[0],&x[1],&x[2],&x[3],&x[4])){
    
    memset(card,0,sizeof(card));
    memset(fg,0,sizeof(fg));


    for(i=0;i<5;i++)card[x[i]]++;

    for(i=1;i<14;i++){
      if(card[i]==2 && fg[0]==0)fg[0]=1;
      else if(card[i]==2 && fg[0]==1){
	fg[0]=0;
	cout <<"two pair" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==3 && fg[0]!=1)fg[3]=1;
      else if(card[i]==3 && fg[0]==1){
	fg[0]=0;
	cout << "full house" << endl;
	fg[2]=1;
	break;
      }
      else if(card[i]==4){
	cout << "four card" << endl;
	fg[2]=1;
	break;
      }
    }
    if(fg[0]==1){
      cout << "one pair" << endl;
      fg[2]=1;
    }
    else if(fg[3]==1){
      cout << "three card" << endl;
      fg[2]=1;
    }
    
    for(i=0;i<5;i++)y.push_back(x[i]);
    sort(y.begin(),y.end());
 
    for(i=1;i<4;i++)if(y[i]+1!=y[i+1])fg[4]=1;

    if(!fg[4] && !fg[2]){
      cout << "straight" <<endl;
      fg[2]=1;
    }
    if(fg[2]==0)cout <<"null"<<endl;
    y.clear();
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define o(a) cout<<a<<endl
using namespace std;

int main(){
	int a;
	while(scanf("%d",&a)!=EOF){
		int d[14]={},p=0,m=0;
		char c;
		vector<int> n(5);
		n[0]=a;
		d[n[0]]++;
		rep(i,1,5){
			cin>>c>>n[i];
			d[n[i]]++;
		}
		sort(n.begin(),n.end());
		rep(i,1,14){
			m=max(m,d[i]);
			if(d[i]>=2) p++;
		}
		if(m==4){
			o("four card");
		}else if(m==3 && p==2){
			o("full house");
		}else if(m==3){
			o("three card");
		}else if(p==2){
			o("two pair");
		}else if(p==1){
			o("one pair");
		}else{
			bool f=1;
			rep(i,0,4){
				if(n[i+1]!=n[i]+1 && !(n[0]==1 && n[1]==10 && n[4]==13)){
					f=0; break;
				}
			}
			if(f) o("straight");
			else o("null");
		}
	}
}

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

string pairs[2][3] = { {"null","one pair","two pair"},
					  {"three card","full house",""} };

int main() {
	int n[5], c, three, two;
	while (scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF) {
		int card[13] = { 0 }, c = 0, three = 0, two = 0;
		for (int i = 0; i < 5; i++) {
			card[n[i] - 1]++;
		}

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

				if (c == 4 && i == 12 && card[0] == 1) {
					c = 5;
					break;
				}
			} else if(card[i] == 0 && c != 0) {
				c = 0;
			}
		}

		if (c == 5) {
			cout << "straight" << endl;
		} else if (c == 114514) {
			cout << "four card" << endl;
		} else {
			cout << pairs[three][two] << endl;
		}
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

enum Direction {R, L, U, D};

bool input(int b[])
{
	char dummy;
	for (int i=0; i<5; i++) {
		if ( !(cin >> b[i]) ) return false;
		if (b[i]==1) b[i]+=13;
		if (i<4) cin >> dummy;
	}
	return true;
}

void sort5(int a[])
{
	for (int i=0; i<5; i++) {
		for (int j=4; j>i; j--) {
			if (a[j-1] > a[j]) {
				int tmp = a[j];	a[j] = a[j-1]; a[j-1] = tmp;
			}
		}
	}
}

int main()
{
	int hand[5];
	while ( input(hand) ) {
		sort5(hand);
		if ( hand[0] == hand[3] || hand[1] == hand[4] ) {
			cout << "four card";
		} else if ( (hand[0] == hand[2] && hand[3] == hand[4]) || (hand[0] == hand[1] && hand[2] == hand[4]) ) {
			cout << "full house";
		} else if ( hand[0] + 1 == hand[1] && hand[1] + 1 == hand[2] && hand[2] + 1 == hand[3] && hand[3] + 1 == hand[4] ) {
			cout << "straight";
		} else if ( hand[0] == hand[2] || hand[1] == hand[3] || hand[2] == hand[4] ) {
			cout << "three card";
		} else if ( hand[0] == hand[1] && hand[2] == hand[3] || hand[0] == hand[1] && hand[3] == hand[4] || hand[1] == hand[2] && hand[3] == hand[4] ) {
			cout << "two pair";
		} else if ( hand[0] == hand[1] || hand[1] == hand[2] || hand[2] == hand[3] || hand[3] == hand[4]) {
			cout << "one pair";
		} else cout << "null";
		cout << endl;
	}
	
	return 0;
}