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<sstream>
#include<vector>
#include<algorithm>
using namespace std;
bool st(vector<int> v){
  if(
     v[1]+1==v[2]&&
     v[2]+1==v[3]&&
     v[3]+1==v[4]){
    if(v[0]+1==v[1]) return true;
    if(v[0]==1&&v[4]==13) return true;
  }
  return false;
}
int main(){
  string buf;
  int i,j,k;
  while(cin >> buf){
    vector<int> v,p;
    for(i=0;i<buf.size();i++) if(buf[i]==',') buf[i]=' ';
    stringstream ss(buf);
    for(i=0;i<5;i++){
      ss >> k;
      v.push_back(k);
    }
    sort(v.begin(),v.end());
    k=1;
    for(i=1;i<5;i++){
      //cout << v[i] << endl;
      if(v[i-1]==v[i]) k++;
      else {
    p.push_back(k);
    k=1;
      }
    }
    if(k!=1) p.push_back(k);
    sort(p.begin(),p.end(),greater<int>());
    //for(i=0;i<p.size();i++) cout << p[i] << endl;
    if(p[0]==4) cout << "four card" << endl;
    else if(p[0]==3&&p[1]==2) cout << "full house" << endl;
    else if(p[0]==3) cout << "three card" << endl;
    else if(p[0]==2&&p[1]==2) cout << "two pair" << endl;
    else if(p[0]==2) cout << "one pair" << endl;
    else if(st(v)) cout << "straight" << endl;
    else cout << "null" << endl;
  }
 
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(1){
		int card[13]; // A ~ 13
		int data[5];

		char c0;
		for(int i = 0; i < 5; ++i){
			if(i != 0) cin >> c0;
			cin >> data[i];
			++card[data[i] - 1];
		}

		if(cin.eof()) break;

		sort(card, card + 13, greater<int>());
		/*
		for(int i = 0; i < 13; ++i){
			cout << card[i] << " ";
		}
		cout << endl;
		*/
		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 :
				if(card[1] == 2)
					cout << "two pair" << endl;
				else
					cout << "one pair" << endl;
				break;

			default :
				sort(data, data + 5);
				bool check = true;
				if(data[4] == 13) data[0] = 9;
				for(int i = 0; i < 5; ++i){
					if(data[0] + i != data[i]){
						check = false;
						break;
					}
				}
				if(check)
					cout << "straight" << endl;
				else
					cout << "null" << endl;
				break;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

int a;
vi n(5);
char t;

int main(){
	while(cin>>a){
		vi vec,tmp;
		n[0]=a;
		vec.push_back(a);
		for(int i=1;i<5;i++){
			cin>>t>>n[i];
			bool used=1;
			for(int j=0;j<vec.size();j++){
				if(n[i]==vec[j]) used=0;
			}
			if(used) vec.push_back(n[i]);
			else tmp.push_back(n[i]);
		}
		if(vec.size()==4){
			cout<<"one pair"<<endl;;
			continue;
		}
		if(vec.size()==3){
			if(tmp[0]==tmp[1]) cout<<"three card"<<endl;
			else cout<<"two card"<<endl;
			continue;
		}
		if(vec.size()==2){
			if(tmp[0]==tmp[1]&&tmp[1]==tmp[2]) cout<<"four card"<<endl;
			else cout<<"full house"<<endl;
			continue;
		}
		sort(n.begin(),n.end());
		int tmpn=0;
		for(int i=1;i<4;i++){
			if(n[i]+1==n[i+1]) tmpn++;
		}
		if((n[0]==1&&n[1]==10)||n[0]+1==n[1]) tmpn++;
		cout<<tmpn<<endl;
		if(tmpn==4){
			cout<<"straight"<<endl;
			continue;
		}
		cout<<"null"<<endl;
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;



string judge(int* nums){
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	string ret="";
	foreach(it,count){
		if(it->second>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(it->second==4){
			ret = "four card";
			break;
		}else if(it->second==3){
			if(is2){
				ret = "full house";
				break;
			}else{
				is3 = true;
			}
		}else if(it->second==2){
			if(is3){
				ret = "full house";
				break;
			}else if(is2){
				ret = "two pair";
				break;
			}else{
				is2 = true;
			}
		}
	}
	if(count[1]==1&&count[13]==1&&count[12]==1&&count[11]==1&&count[10]==1){
		return "straight";
	}
	if(mc==5){
		return "straight";
	}else if(ret!=""){
		return ret;
	}else if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}



int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}