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<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a;  i ++)
int main(void){
  vector<int> array(5);
  vector<int> original;
  vector<int> card(15);
  string s;  
  while(cin>>s){
    rep(i,5)array[i]=0;
    rep(i,15)card[i]=0;
    for(int i = 0, j = 0 ; i < s.size() ; i ++){
      if(s[i] == ','){
	j++;continue;
      }
      array[j] = array[j] * 10 +s[i]-'0';
    }
    rep(i,5){
      card[array[i]]++;
      if(array[i] == 1)card[14]++;
    }

    original = card;
    sort(card.begin(),card.end(),greater<int>());
    
    //rep(i,5)cout<<card[i]<<endl;
    if(
       (card[0 ] == 1 && card[1 ] == 1 && card[2 ] == 1 && card[3 ] == 1 && card[4] == 1 ) 
       ){
      int cnt = 0;
      rep(i,15){
	//cout<<original[i]<<" "<<cnt<<endl;;
	if(cnt == 4) break;
	if(original[i] == original[i+1] && original[i] != 0 )cnt ++;
	else cnt = 0;
      }
      if(cnt == 4)cout<<"straight"<<endl;
      else cout<<"null"<<endl;
     
      continue;
    }
    sort(array.begin(),array.end());
    switch(card[0]){
    case 4:
      cout<<"four card"<<endl;break;
    case 3:
      if(card[1]==2){
	cout<<"full house"<<endl;
      }else{
	cout<<"three card"<<endl;
      }
      break;
    case 2:
      // rep(i,card.size())cout<<original[i]<<endl;
      if(card[1]==2 && original[14] != 2){
	cout<<"two pair"<<endl;
      }else{
	cout<<"one pair"<<endl;
      }
      break;
    default:
      cout<<"null"<<endl;
    }
  }
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){

  vector<int> card(5);
  
  while(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) != EOF){
	bool judge_1p = false;
	bool judge_2p = false;
	bool judge_3 = false;
	bool judge_4 = false;
	bool judge_s = false;

	sort(card.begin(),card.end());
	
	for(int i=0;i<4;++i){
	  int count = 1;
	  for(int j=i+1;j<5;++j){
		if(card[i]==card[j])
		  count++;
		else{
		  i = j - 1;
		  break;
		}
	  }
	  if(count == 2){
		if(judge_1p == false)
		  judge_1p = true;
		else if(judge_1p == true)
		  judge_2p = true;
	  }
	  else if(count == 3)
		judge_3 = true;
	  else if(count == 4)
		judge_4 = true;
	  
	}

	if(card[0] == 1 && card[1] == 10 &&
	   card[2] == 11 && card[3] == 12 &&
	   card[4] == 13){
	  cout<<"straight"<<endl;
	  continue;
	} 
	
	for(int i=0;i<4;++i){
	  if(card[i] == card[i+1] - 1 && i == 3)
		judge_s = true;
		
	  else if(card[i] != card[i+1] - 1)
		break;
	}

	if(judge_4 == true)
	  cout<<"four card"<<endl;
	else if(judge_3 == true && judge_1p == true )
	  cout<<"full house"<<endl;
	else if(judge_3 == true)
	  cout<<"three card"<<endl;
	else if(judge_2p == true)
	  cout<<"two pair"<<endl;
	else if(judge_1p == true)
	  cout<<"one pair"<<endl;
	else if(judge_s == true)
	  cout<<"straight"<<endl;
	else
	  cout<<"null"<<endl;
  }
  
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

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

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

bool isLeep(int n){
    if((n%4==0 && n%100!=0) || n%400==0){
        return true;
    }
    else return false;
}


int main() {
    int a[5]={};
    char ch;
    while(cin>>a[0]>>ch>>a[1]>>ch>>a[2]>>ch>>a[3]>>ch>>a[4]){
        sort(a,a+5);
        if( (a[0]==a[1] && a[1]==a[2] && a[2]==a[3]) || (a[1]==a[2] && a[2]==a[3] && a[3]==a[4]) )cout<<"four card"<<endl;
        else if( (a[0]==a[1] && a[1]==a[2] && a[3]==a[4]) || (a[0]==a[1] && a[2]==a[3] && a[3]==a[4]) )cout<<"full house"<<endl;
        else if( (a[0]+1==a[1] && a[1]+1==a[2] && a[2]+1==a[3] && a[3]+1==a[4]) || (a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13) )cout<<"straight"<<endl;
        else if( (a[0]==a[1] && a[1]==a[2]) || (a[1]==a[2] && a[2]==a[3]) || (a[2]==a[3] && a[3]==a[4]) )cout<<"three card"<<endl;
        else if( (a[0]==a[1] && (a[2]==a[3] || a[3]==a[4] )) || (a[1]==a[2] && a[3]==a[4]) )cout<<"two pair"<<endl;
        else if( a[0]==a[1] || a[1]==a[2] || a[2]==a[3] || a[3]==a[4] )cout<<"one pair"<<endl;
        else cout<<"null"<<endl;
    }
    
    return 0;
}

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

using namespace std;
int main(void)
{
	int card[5];
	char kari;
	//while(1)
	{
		for(int i = 0;i < 5;i++)
		{
			if(scanf("%d",&card[i])== EOF) goto kitune;
			scanf("%c",&kari);
		}
		int cnt = 0,check[15] = {0};
		sort(card,card+5);
		for(int i = 0;i<5;i++)
		{
			check[card[i]]++;
			if(card[i] == 1) check[14] = 1;
		}
		for(int i = 0;i<=14;i++)
		{
			if(check[i] == 1)
			{
				if(check[i+1] == 1) 
				{
					cnt++;
					if(cnt == 4) break;
				}
				else cnt = 0;
			}
		}

		int pair = 0;
		int three = 0;
		int four = 0;
		int st = 0;
		if(cnt == 4)
		{
			printf("straight\n");
			st = 1;
		}
		else
		{
			for(int i = 0;i < 13;i++)
			{
				if(check[i] == 2) pair++;
				else if(check[i] == 3) three++;
				else if(check[i] >= 4) four++;
			}
		}
		if(pair >= 1)
		{
			if(three == 1) printf("full house\n");
			else if(pair == 2) printf("two pair\n");
			else printf("one pair\n");
		}
		else if(three >= 1)
		{
			if(pair == 1) printf("full house\n");
			else if(three == 2) printf("full house\n");
			else printf("three card\n");
		}
		else if(four >= 1) printf("four card\n");
		else if(st != 1) printf("null\n");
	}
	kitune:
	return 0;
}