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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define forever for (;;)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
template<typename A> using V = std::vector<A>;
template<typename A> using F = std::function<A>;
template<typename A, typename B> using P = std::pair<A, B>;
using pii = P<int, int>;
using vi = V<int>;
using vd = V<double>;
using vs = V<std::string>;
using vpii = V<pii>;
using vvi = V<vi>;
using vvpii = V<vpii>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979;
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int n) { return n & 1; }
constexpr bool even(const int n) { return ~n & 1; }
template<typename T> std::istream &operator>>(std::istream &is, std::vector<T> &v) { for (T &x : v) is >> x; return is; }
template<typename A, typename B> std::istream &operator>>(std::istream &is, std::pair<A, B> &p) { is >> p.first; is >> p.second; return is; }
using namespace std;
// clang-format on

main {
  vi v(5);
  char gomi;
  while (cin >> v[0] >> gomi >> v[1] >> gomi >> v[2] >> gomi >> v[3] >> gomi >> v[4]) {
    sort(all(v));
    if (v[0] == v[3] || v[1] == v[4]) {
      cout << "four card" << endl;
      continue;
    }
    if ((v[0] == v[1] && v[2] == v[4]) || (v[0] == v[2] && v[3] == v[4])) {
      cout << "full house" << endl;
      continue;
    }
    if (v[4] - v[0] == 4 || (v[0] == 1 && v[1] == 10 && v[4] - v[1] == 3)) {
      cout << "straight" << endl;
      continue;
    }
    if (v[0] == v[2] || v[1] == v[3] || v[2] == v[4]) {
      cout << "three card" << endl;
      continue;
    }
    if ((v[0] == v[1] && (v[2] == v[3] || v[3] == v[4])) || (v[1] == v[2] && v[3] == v[4])) {
      cout << "two pair" << endl;
      continue;
    }
    if (v[0] == v[1] || v[1] == v[2] || v[2] == v[3] || v[3] == v[4]) {
      cout << "one pair" << endl;
      continue;
    }
    cout << "null" << endl;
  }
}

C++: //0038 Poker Hand

#include<iostream>
#include<algorithm>
using namespace std;


int main(void)
{
	const int N = 5;
	while(1)
	{
		int hand[N];
		char dummy;
		int i, j;
		for(i = 0; i < N; i++)
		{
			if(i)
				cin >> dummy;
			cin >> hand[i];
		}
		if(!cin)
			break;

		sort(hand, hand+N);

		if(hand[0] == hand[3] ||
			hand[1] == hand[4])
			cout << "four card" << endl;
		else if( (hand[0] == hand[1] && hand[2] == hand[4]) ||
				(hand[0] == hand[2] && hand[3] == hand[4]) )
			cout << "full house" << endl;
		else if( (hand[0] == 1 && hand[1] == 10 && hand[2] == 11 && hand[3] == 12 && hand[4] == 13) ||
			(hand[0]+1==hand[1] && hand[1]+1==hand[2] && hand[2]+1==hand[3] && hand[3]+1==hand[4]) )
			cout << "straight" << endl;
		else if( (hand[0] == hand[2] || hand[1] == hand[3] || hand[2] == hand[4]) )
			cout << "three card" << endl;
		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" << endl;
		else if( hand[0]==hand[1] || hand[1]==hand[2] || hand[2]==hand[3] || hand[3]==hand[4] )
			cout << "one pair" << endl;
		else
			cout << "null" << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
//#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

int main(){
  int a,b,c,d,e;
  char x;
  while(cin>>a>>x>>b>>x>>c>>x>>d>>x>>e){
    int num[14]={};
    num[a]++;num[b]++;num[c]++;num[d]++;num[e]++;
    int M_NUM=*max_element(num,num+14);
    bool key=false;
    loop(i,1,10)if(num[i]==1&&num[i+1]==1&&num[i+2]==1&&num[i+3]==1&&num[i+4]==1)key=true;
    if(num[1]==1&&num[13]==1&&num[12]==1&&num[11]==1&&num[10]==1)key=true;
    if(key){
      cout<<"straight"<<endl;
      goto at;
    }
    if(M_NUM==4){
      cout<<"four card"<<endl;
      goto at;
    }else if(M_NUM==3){
      bool flag=false;
      rep(i,14)if(num[i]==2)flag=true;
      if(flag){
        cout<<"full house"<<endl;
        goto at;
      }else{
        cout<<"three card"<<endl;
        goto at;
      }
    }else if(M_NUM==2){
      int p=0;
      rep(i,14)if(num[i]==2)p++;
      if(p==2){
        cout<<"two pair"<<endl;
        goto at;
      }else{
        cout<<"one pair"<<endl;
        goto at;
      }
    }else{
      cout<<"NULL"<<endl;
    }
    at: ;
  }
  return 0;
}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, c[5], t;
  while(scanf("%d", &c[0]) != EOF) {
    for(i = 1; i < 5; ++i) scanf(",%d", &c[i]);
    for(i = 0; i < 5; ++i) if(c[i] == 1) c[i] = 14;
    for(i = 0; i < 5; ++i) for(j = i + 1; j < 5; ++j) if(c[i] > c[j]) t = c[i], c[i] = c[j], c[j] = t;
    if((c[0] == c[1] && c[1] == c[2] && c[2] == c[3]) || (c[3] == c[4] && c[1] == c[2] && c[2] == c[3])) printf("four card\n");
    else if((c[0] == c[1] && c[1] == c[2] && c[3] == c[4]) || (c[0] == c[1] && c[2] == c[3] && c[3] == c[4])) printf("full house\n");
    else if((c[4] == c[3] + 1 || (c[4] == 14 && c[3] == 2)) && c[3] == c[2] + 1 && c[2] == c[1] + 1 && c[1] == c[0] + 1) printf("straight\n");
    else if((c[0] == c[1] && c[1] == c[2]) || (c[2] == c[3] && c[1] == c[2]) || (c[2] == c[3] && c[3] == c[4])) printf("three card\n");
    else if((c[0] == c[1] && c[2] == c[3]) || (c[0] == c[1] && c[3] == c[4]) || (c[1] == c[2] && c[3] == c[4])) printf("two pair\n");
    else if(c[0] == c[1] || c[1] == c[2] || c[2] == c[3] || c[3] == c[4]) printf("one pair\n");
    else printf("null\n");
  }
  return 0;
}