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 <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <complex>
using namespace std;

typedef long long ll;
typedef pair<int,int> P;

#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;

inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class T> void preview(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}

const int INF = 100000000;
const double PI = acos(-1.0), EPS = 1e-10;

int main() {
	for(string line; cin >> line;) {
		rep(i,line.length()) if(line[i] == ',') line[i] = ' ';
		istringstream is(line);
		vector<int> card(5);
		rep(i,5) is >> card[i];
		sort(all(card));

		map<int, int> m;
		rep(i,5) m[card[i]]++;

		// four cards
		{
			bool four_card = false;
			int two_pair = 0;
			bool three_cards = false;
			each(it, m) {
				if(it->second == 4) four_card = true;
				if(it->second == 3) three_cards = true;
				if(it->second == 2) two_pair++;
			}

			bool streat = true;
			for(int i = 1; i < 5; i++) {
				if(card[i] != card[i - 1] + 1) streat = false;
			}
			if(card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13) streat = true;

			string ans;
			if(four_card) ans = "four cards";
			else if(three_cards && two_pair) ans = "full house";
			else if(streat) ans = "straight";
			else if(three_cards) ans = "three card";
			else if(two_pair == 2) ans = "two pair";
			else if(two_pair == 1) ans = "one pair";
			else ans = "null";

			cout << ans << endl;
		}
	}

	return 0;
}

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

using namespace std;

int main(void){
  int i,j,k,l;
  int card[5];
  int poker_hand;
  bool flag;

  while(true){
    poker_hand=0;
    for(i=0;i<5;i++){
      if(scanf("%d,",&card[i])==EOF)return(0);
    }
    sort(card,card+5);
    for(i=0;i<4;i++){
      if(card[i]==card[i+1])poker_hand=1;
    }
    if(card[0]==card[1]&&card[2]==card[3])poker_hand=2;
    if(card[0]==card[1]&&card[3]==card[4])poker_hand=2;
    if(card[1]==card[2]&&card[3]==card[4])poker_hand=2;
    for(i=0;i<3;i++){
      if(card[i]==card[i+1]&&card[i]==card[i+2])poker_hand=3;
    }
    flag=true;
    for(i=1;i<5;i++){
      if(card[i]!=card[0]+i)flag=false;
    }
    if(flag)poker_hand=4;
    flag=true;
    if(card[0]==1&&card[1]==10){
      for(i=1;i<4;i++){
	if(card[i+1]!=card[1]+i)flag=false;
      }
    }else{
      flag=false;
    }
    if(flag)poker_hand=4;
    if(card[0]==card[1]&&card[0]==card[2]&&card[3]==card[4])poker_hand=5;
    if(card[0]==card[1]&&card[2]==card[3]&&card[2]==card[4])poker_hand=5;
    if(card[0]==card[3])poker_hand=6;
    if(card[1]==card[4])poker_hand=6;

    
    switch (poker_hand) {
      case 0:
	printf("null\n");
	break;
      case 1:
	printf("one pair\n");
	break;
      case 2:
	printf("two pair\n");
	break;
      case 3:
	printf("three card\n");
	break;
      case 4:
	printf("straight\n");
	break;
      case 5:
	printf("full house\n");
	break;
      case 6:
	printf("four card\n");
	break;
    }
  }
  return(0);
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <sstream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define COUNT(i, n) for(int i = 1; i <= n; i ++)
#define ITER(c) __typeof((c).begin())
#define each(c, it) for(ITER(c) it =(c).begin(); it!=(c).end(); it++)
#define ALL(c) c.begin(), c.end()
#define mp make_pair
#define pb push_back
#define MEMSET(v, h) memset((v), h, sizeof(v))
 
using namespace std; 

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;
const int N = 5;
const string perm = "12345678910111213110111213";

int main(void){
    string res;
    for(vi in(N); cin >> in[0]; cout << res << endl){
        COUNT(i, N - 1){ char c; cin >> c >> in[i]; }
        set<int> u; rep(i, N) u.insert(in[i]);

        vi cnt;
        each(u, it) cnt.pb(count(ALL(in), *it));
        sort(ALL(cnt), greater<int>());

        switch(*cnt.begin()){
            case 4: 
                res = "four card";
                break;
            case 3:
                if(*(cnt.begin() + 1) == 2) res = "full house";
                else res = "three card";
                break;
            case 2:
                if(*(cnt.begin() + 1) == 2) res = "two pair";
                else res = "one pair";
                break;
            default:
                stringstream ss;
                sort(ALL(in));
                rep(i, N) ss << in[i];
                if(~perm.find(ss.str())) res = "straight";
                else res = "null";
                break;
        }
    }
 
    return 0;
}