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 <string>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <utility>
#define INF 1000000000
#define mod 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define all(x) (x).begin(),x.end()
using namespace std;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
bool debug=false;

int c[6];

void DEBUG(){
  rep(i,5)cout<<c[i]<<" ";
  cout<<endl;
}

void tranp_sort(){
  for(int i=0;i<5;i++){
    if(c[i]==1)c[i]+=13;
  }
  sort(c,c+5);
  for(int i=0;i<5;i++){
    if(c[i]==14)c[i]=1;
  }
}

void input(){  
  getchar();cin>>c[1];
  getchar();cin>>c[2];
  getchar();cin>>c[3];
  getchar();cin>>c[4];
}


bool one_pair(){
  for(int i=1;i<5;i++){
    if(c[i]==c[i-1])return true;
  }
  return false;
}

bool two_pair(){
  int cnt=0;
  map<int,int>m;
  for(int i=0;i<5;i++)m[c[i]]++;
  for(int i=1;i<=13;i++){
    if(m[i]==2)cnt++;
  }
  if(cnt==2)return true;
  else return false;
}

bool three_card(){
  for(int i=2;i<5;i++){
    if(c[i]==c[i-1]&&c[i-1]==c[i-2])return true;
  }
  return false;
}

bool four_card(){
  for(int i=3;i<5;i++){
    if(c[i]==c[i-1]&&c[i-1]==c[i-2]&&c[i-2]==c[i-3])return true;
  }
  return false;
}

bool fullhouse(){
  bool a,b;
  a=b=false;
  map<int,int>m;
  for(int i=0;i<5;i++)m[c[i]]++;
  for(int i=1;i<=13;i++){
    if(m[i]==3)a=true;
    if(m[i]==2)b=true;
  }
  if(a==true&&b==true)return true;
  else return false;
}

bool straight(){
  //DEBUG();
  int tmp=c[0];
  if(c[0]==2&&c[1]==3&&c[2]==4&&c[3]==5&&c[4]==1)return true;
  for(int i=0;i<5;i++){
    if(c[i]==1)tmp++;
    //cout<<c[i]<<" = "<<(tmp+i)%14<<endl;
    if((tmp+i)%14!=c[i])return false;
  }
  return true;
}

int main(){

  while(cin>>c[0]){
    input();
    tranp_sort();
    if(four_card())cout<<"four card"<<endl;
    else if(fullhouse())cout<<"full house"<<endl;
    else if(straight())cout<<"straight"<<endl;
    else if(three_card())cout<<"three card"<<endl;
    else if(two_pair())cout<<"two pair"<<endl;
    else if(one_pair())cout<<"one pair"<<endl;
    else cout<<"null"<<endl;
  }
  return 0;
}

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

using namespace std;

int main(int argc, char *argv[]) {
  int hand[5], card[13];
  int yaku[5];
  while(scanf("%d,%d,%d,%d,%d",
              hand+0, hand+1, hand+2, hand+3, hand+4) == 5) {

    memset(card, 0, sizeof(int) * 13);
    memset(yaku, 0, sizeof(int) * 5);
    for (int i = 0; i < 5; i++)
      card[hand[i]-1]++;
    int j = 0;
    for (int i = 0; i < 13; i++)
      if (card[i] != 0)
        yaku[j++] = card[i];
    sort(yaku+0, yaku+j);

    j--;
    if (yaku[j] == 4) {
      cout << "four card" << endl;
    } else if (yaku[j] == 3 && yaku[j-1] == 2) {
      cout << "full house" << endl;
    } else if (yaku[j] == 3) {
      cout << "three card" << endl;
    } else if (yaku[j] == 2 && yaku[j-1] == 2) {
      cout << "two pair" << endl;
    } else if (yaku[j] == 2) {
      cout << "one pair" << endl;
    } else {
      sort(hand+0, hand+5);
      if ((hand[0]+1 == hand[1] &&
           hand[1]+1 == hand[2] &&
           hand[2]+1 == hand[3] &&
           hand[3]+1 == hand[4]) ||
          (hand[0] == 1 &&
           hand[1] == 10 &&
           hand[2] == 11 &&
           hand[3] == 12 &&
           hand[4] == 13))
        cout << "straight" << endl;
      else
        cout << "null" << endl;
    }
  }
  return 0;
}

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

int a[5];

string S;

string poker(int p, int q, int r, int s, int t)
{
	if (p == q && q == r && r == s)
	{
		return "four card";
	}
	if (s == t && q == r && r == s)
	{
		return "four card";
	}
	if (p == q && q == r && s == t)
	{
		return "full house";
	}
	if (p == q && r == s && s == t)
	{
		return "full house";
	}
	if (p == q - 1 && q == r - 1 && r == s - 1 && s == t - 1)
	{
		return "straight";
	}
	if (p == 1 && q == 10 && r == 11 && s == 12 && t == 13)
	{
		return "straight";
	}
	if (p == q && q == r)
	{
		return "three card";
	}
	if (r == s && q == r)
	{
		return "three card";
	}
	if (r == s && s == t)
	{
		return "three card";
	}
	if (p == q && r == s)
	{
		return "two pair";
	}
	if (p == q && s == t)
	{
		return "two pair";
	}
	if (q == r && s == t)
	{
		return "two pair";
	}
	if (p == q)
	{
		return "one pair";
	}
	if (q == r)
	{
		return "one pair";
	}
	if (r == s)
	{
		return "one pair";
	}
	if (s == t)
	{
		return "one pair";
	}
	return "null";
}

int main() {
	while (cin >> S)
	{
		int cnt = 0;
		string U = "";
		S += ',';
		for (int i = 0; i < S.size(); i++)
		{
			if (S[i] == ',')
			{
				a[cnt] = stoi(U);
				U = "";
				cnt++;
			}
			else
			{
				U += S[i];
			}
		}
		sort(a, a + 5);
		cout << poker(a[0], a[1], a[2], a[3], a[4]) << endl;
	}
}