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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }


int main()
{
	while(true)
	{
		int v[5];
		char k;
		
		if(cin.eof()) break;
		cin >> v[0];
		rep(i, 4)
			cin >> k >> v[i+1];


		vint n(13, 0);

		rep(i, 5)
			n[v[i]-1]++;

		rep(i, 13)	if(4 <= n[i])
		{
			cout << "four card" << endl;
			goto ng;
		}

		rep(i, 13) rep(j, 13) if(n[i] == 2 && n[j] == 3)
		{
			cout << "full house" << endl;
			goto ng;
		}

		rep(i, 10) if(n[i % 13] == 1 && n[(i+1) % 13] == 1 &&  n[(i+2) % 13] == 1 &&  n[(i+3) % 13] == 1 &&  n[(i+4) % 13] == 1)
		{
			cout << "straight" << endl;
			goto ng;
		}

		rep(i, 13) if(3 <= n[i])
		{
			cout << "three card" << endl;
			goto ng;
		}

		rep(i, 13) REP(j, 1, 13) if(n[i] == 2 && n[j] == 2)
		{
			cout << "two pair" << endl;
			goto ng;
		}

		rep(i, 13) if(n[i] == 2)
		{
			cout << "one pair" << endl;
			goto ng;
		}

		cout << "null" << endl;

ng:
		;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;

using db = double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

int a[5];
int c[14];

int main() {
	ios :: sync_with_stdio(0);

	while(cin >> a[0]) {
		char t;
		for(int i = 1; i < 5; i ++)
			cin >> t >> a[i];
		fill(c, c + 14, 0);
		for(int i = 0; i < 5; i ++)
			c[a[i]] ++;

		auto f = [&](int i) {
			return count(c, c + 14, i);
		};
		auto straight = [&]() {
			bool r = 0;
			for(int i = 1; i <= 10; i ++) {
				bool t = 1;
				for(int j = i; j < i + 5; j ++)
					if(!c[j])
						t = 0;
				r |= t;
			}
			return r;
		};

		if(f(4))
			cout << "four card\n";
		else if(f(3) && f(2))
			cout << "full house\n";
		else if(straight())
			cout << "straight\n";
		else if(f(3))
			cout << "three card\n";
		else if(f(2) == 2)
			cout << "two pair\n";
		else if(f(2))
			cout << "one pair\n";
		else
			cout << "null\n";
	}

	return 0;
}

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

using namespace std;

int main()
{
  string trump;
  while(getline(cin,trump)){  
    int two = 0; int three = 0; int four = 0;
    int a = 0;
    int b = 0;
    vector<int> poker;
    int check[15] = {0};
    int ans = 0;

    for(char e : trump){
      if(e == 49){
        if(b == 0){
          b = 1;
        }
        else{
          a = (e - 48) + 10;
          poker.push_back(a);
          b = 0;
        }
      }
      else if(48 <= e && 57 >= e && e != 49){
        if(b == 1){
          a = (e - 48) + 10;
          b = 0;
        }
        else{
          a = e - 48;
        }
        poker.push_back(a);
      }
      else{
        if(b == 1){
          poker.push_back(b);
          b = 0;
        }
      }
    }

    for(int e : poker){
      cout<<e<<endl;
    }
  
    if(b == 1){
      poker.push_back(b);
    }

    for(int e : poker){
      ++check[e];
    }

    check[14] = check[1];

    for(int i = 1;i < 14;++i){
      if(check[i] == 4){
        ++four;
      }
      else if(check[i] == 3){
        ++three;
      }
      else if(check[i] == 2){
        ++two;
      }
    }

    if(four == 1){
      cout<<"four card"<<endl;
      ans = 1;
    }
    else if(three == 1){
      ans = 1;
      if(two == 1){
        cout<<"full house"<<endl;
      }
      else{
        cout<<"three card"<<endl;
      }
    }
    else if(two == 2){
      ans = 1;
      cout<<"two pair"<<endl;
    }
    else if(two == 1){
      ans = 1;
      cout<<"one pair"<<endl;
    }
    else{
      for(int i = 1;i < 11;++i){
        if(check[i] == check[i+1] && check[i] == check[i+2] && check[i] == check[i+3] && check[i] == check[i+4] && check[i] != 0){
          cout<<"straight"<<endl;
          ans = 1;
          break;
        }
      }
    }

    if(ans == 0){
      cout<<"null"<<endl;
    }
  }
  return 0;
}

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

int check(vector<int> v) {
	sort(v.begin(), v.end());
	//for (int i = 0; i < v.size(); i++)cout << v[i] << "  ";
	if ((v[0] == v[1] && v[1] == v[2] && v[2]== v[3]) || (v[1] == v[2] && v[2]== v[3] && v[3] == v[4])) {//four cards
		return 1;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) && (v[3] == v[4])) || ((v[0] == v[1]) && (v[2] == v[3] && v[3] == v[4]))) {//full house
		return 2;
	}
	else if (v[0] == v[1] - 1 && v[0] == v[2] - 2 && v[0] == v[3] - 3 && v[0] == v[4] - 4) {//straight
		return 3;
	}
	else if (v[0]==1 && v[1]==10 && v[2]==11 && v[3] == 12 && v[4] == 13) {//straight
		return 3;
	}
	else if (((v[0] == v[1] && v[1] == v[2]) || (v[1] == v[2] && v[2] == v[3])) || ((v[2] == v[3] && v[3] == v[4]))) {//three cards
		return 4;
	}
	else if ((v[0] == v[1] && v[2] == v[3]) || (v[0] == v[1] && v[3] == v[4]) || (v[1] == v[2] && v[3] == v[4])) {//two pair
		return 5;
	}
	else if ((v[0] == v[1]) || (v[1] == v[2]) || (v[2] == v[3]) || (v[3] == v[4])) {//one pair
		return 6;
	}
	else {
		return 7;
	}
}


int main()
{
	vector<int> v;
	int a, b, c, d, e;
	while (scanf_s("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF) {
		v.clear();
		v.push_back(a);
		v.push_back(b);
		v.push_back(c);
		v.push_back(d);
		v.push_back(e);
		switch (check(v)) {
			case 1:cout << "four cards" << endl; break;
			case 2:cout << "full house" << endl; break;
			case 3:cout << "straight" << endl; break;
			case 4:cout << "three card" << endl; break;
			case 5:cout << "two pair" << endl; break;
			case 6:cout << "one pair" << endl; break;
			case 7:cout << "null" << endl; break;
			default:cout << "Error" << endl; break;
		}
	}
    return 0;
}