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 <bits/stdc++.h>
using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

string Solve(vector<int> v){
  set<int> s;
  int st = 0;
  REP(i,1,14){
    if(v[i] > 0){
      s.insert(i);
    }
    if(v[i] == v[i-1] && v[i] != 0){
      ++st;
    }
  }
  int m = *max_element(all(v));
  if(m == 4){
    return "four card";
  }
  else if(m == 3 && s.size() == 2){
    return "full house";
  }
  else if(m == 1){
    if((v[1] != 0 && v[1] == v[10] && v[11] == v[12] && v[13] == v[1] && v[1] == v[11])||(st == 4)){
      return "straight";
    }
    else
      return "null";
  }
  else if(m == 3 && s.size() == 3){
    return "three card";
  }
  else if(m == 2 && s.size() == 3){
    return "two pair";
  }
  else if(m == 2){
    return "one pair";
  }
  return "null";
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  char c;
  int a,b,d,e,f;
  while(cin >> a >> c >> b >> c >> d >> c >> e >> c >> f){
    vary(int,v,14,0);
    v[a]++;
    v[b]++;
    v[d]++;
    v[e]++;
    v[f]++;
    cout << Solve(v) << endl;
  }
  return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;

int main(){
int n[6];
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;cc=0;}
}

for(int i=0;i<3;i++){
if(n[i+1]!=(n[i]+1))f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc==1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2||cc==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");
else printf("null\n");

c=0,cc=0;f=true;
}
return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int cards[5], i, j, t, r, fl, fl2;
	char c, str[8][11] = {"null", "one pair", "two pair", "three card", "straight", "full house", "four card"};
	while (cin >> cards[0] >> c >> cards[1] >> c >> cards[2] >> c >> cards[3] >> c >> cards[4])
	{
		r = 1;
		sort(cards, cards+5);
		int n[13] = {0};
		for (i = 0; i < 5; i++)
			n[cards[i]-1]++;
		for (i = fl = t = 0; i < 13; i++)
			if (n[i] == 2)	t++;
		if (t == 1)	r = 2;
		if (t == 2)	r = 3;
		for (i = fl = 0; i < 13 && !fl; i++)
			if (n[i] == 3)	r = 4, fl = 1;
		for (i = fl = 0; i < 9 && !fl; i++)
		{
			for (j = 0, fl2 = 1; j < 5 && fl2; j++)
				if (n[i+j] != 1)	fl2 = 0;
			if (fl2)	r = 5, fl2 = 1;
		}
		if (!fl)
		{
			for (i = 9, fl = 0; i < 13 && !fl; i++)
				if (n[i] != 1)	fl = 1;
			if (!fl && n[0])	r = 5;
		}
		for (i = fl = fl2 = 0; i < 13; i++)
		{
			if (n[i] == 2)	fl = 1;
			if (n[i] == 3)	fl2 = 1;
		}
		if (fl && fl2)	r = 6;
		for (i = fl = 0; i < 13 && !fl; i++)
			if (n[i] == 4)
				r = 7, fl = 1;
		cout << str[r-1] << endl;
	}
}

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

int n[5];

int main(){
	while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
		sort(n,n+4);
		if((n[0]==n[1]&&n[1]==n[2]&&n[2]==n[3])||(n[1]==n[2]&&n[2]==n[3]&&n[3]==n[4])) printf("four card\n");
		else if((n[0]==n[1]&&n[1]==n[2]&&n[3]==n[4])||(n[0]==n[1]&&n[2]==n[3]&&n[3]==n[4])) printf("full house\n");
		else if((n[4]==n[3]+1&&n[3]==n[2]+1&&n[2]==n[1]+1&&n[1]==n[0]+1)||(n[0]==10&&n[1]==11&&n[2]==12&&n[3]==13&&n[4]==1)) printf("straight\n");
		else if((n[0]==n[1]&&n[1]==n[2])||(n[1]==n[2]&&n[2]==n[3])||(n[2]==n[3]&&n[3]==n[4])) printf("three card\n");
		else if((n[0]==n[1]&&n[2]==n[3])||(n[0]==n[1]&&n[3]==n[4])||(n[1]==n[2]&&n[3]==n[4])) printf("two pair\n");
		else if(n[0]==n[1]||n[1]==n[2]||n[2]==n[3]||n[3]==n[4]) printf("one pair\n");
		else printf("null\n");
	}
	return 0;
}