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<algorithm>
using namespace std;
int main(){
	int c[6] = {0};
	while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4]) != EOF){
		sort(c,c+5);
		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]))puts("four card");
		else if((c[0] == c[1] && c[2] == c[3] && c[3] == c[4])||(c[0] == c[1] && c[1] == c[2] && c[3] == c[4]))puts("full house");
		else if((c[1] == c[0]+1 && c[2] == c[1]+1 && c[3] == c[2]+1 && c[4] == c[3]+1) || (c[0] == 1 && c[1] == 10 && c[2] == 11 && c[3] == 12 && c[4] == 13))puts("straight");
		else if((c[0] == c[1] && c[1] == c[2]) || (c[1] == c[2] && c[2] == c[3]) || (c[2] == c[3] && c[3] == c[4]))puts("three card");
		else if((c[0] == c[1] && (c[2] == c[3])||(c[3] == c[4])) || (c[1] == c[2] && c[3] == c[4]))puts("two pair");
		else if((c[0] == c[1]) || (c[1] == c[2]) || (c[2] == c[3]) || (c[3] == c[4]))puts("one pair");
		else puts("null");
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> card(5);
  for(;;){
    if(scanf("%d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4]) == EOF) break;
    sort(card.begin(),card.end());
    int ans=0,x=card[0],y=1;
    for(int i=1; i<5; i++){
      if(x == card[i]) y++;
      else{
	if(y == 2) ans+=2;
	if(y == 3) ans+=3;
	if(y == 4) ans+=7;
	x = card[i];
	y = 1;
      }
    }
    if(y == 2) ans+=2;
    if(y == 3) ans+=3;
    if(y == 4) ans+=7;
    if(card[0] == card[1]-1 && card[1] == card[2]-1 && card[2] == card[3]-1 && card[3] == card[4]-1) ans+=10;
    if(card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13) ans+=10;
    if(ans == 0) cout <<"null"<<endl;
    if(ans == 2) cout <<"one pair"<<endl;
    if(ans == 4) cout <<"two pair"<<endl;
    if(ans == 3) cout <<"three card"<<endl;
    if(ans == 5) cout <<"full house"<<endl;
    if(ans == 7) cout <<"four card"<<endl;
    if(ans == 10) cout <<"straight"<<endl;
  }
  return 0;
}

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

#define rep(i,n) for(int i=0;i<(n);++i)
#define loop for(;;)
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;
#define inf (1e9)
#define eps (1e-9)
using Integer = long long;
using Real = long double;
const Real PI = acosl(-1);

template<class S, class T> inline
ostream& operator<<(ostream&os, pair<S,T> p) {
  return os << '(' << p.first << ", " << p.second << ')';
}

template<class S, class T, class U> inline
ostream& operator<<(ostream&os, tuple<S,T,U> t) {
  return os << '('
    << get<0>(t) << ", "
    << get<1>(t) << ", "
    << get<2>(t) << ')';
}

template<class T> inline
ostream& operator<<(ostream&os, vector<T> v) {
  if (v.size() == 0) { return os << "(empty)"; }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

template<class T> inline
istream& operator>>(istream&is, vector<T>&v) {
  rep (i, v.size()) is >> v[i];
  return is;
}

//           ^   >  v   <
int dx[] = { -1, 0, 1,  0 };
int dy[] = {  0, 1, 0, -1 };

using vi = vector<int>;
using vvi = vector<vi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vb = vector<bool>;

int memo[20];

bool fourcard(vi&xs) {
  rep (i, 20) memo[i] = 0;
  for (int x: xs) memo[x]++;
  bool res = false;
  rep (i, 20) if (memo[i] == 4) res = true;
  return res;
}

bool straight(vi&xs) {
  {
    bool res = true;
    rep (i, xs.size()) {
      if (xs[i] != xs[0] + i) res = false;
    }
    if (res) return true;
  }
  if (xs[0] == 1) {
    bool res = true;
    for (int i = 1; i < xs.size(); ++i) {
      if (xs[i] != 9 + i) res = false;
    }
    if (res) return true;
  }
  return false;
}

bool fullhouse(vi&xs) {
  if ( xs[0] == xs[1] and xs[2] == xs[3] and xs[3] == xs[4]) return true;
  if ( xs[0] == xs[1] and xs[1] == xs[2] and xs[3] == xs[4]) return true;
  return false;
}

bool three(vi&xs) {
  int n = 0;
  rep (i, xs.size()) {
    int m = 0;
    for (int j = i; j < xs.size(); ++j) {
      if (xs[i] == xs[j]) ++m;
      else break;
    }
    n = max(n, m);
  }
  return n >= 3;
}

bool two(vi&xs) {
  rep (i,20) memo[i] = 0;
  for (int x: xs) memo[x]++;

  int m = 0;
  rep (i,20) if (memo[i] == 2) ++m;
  return m == 2;
}

bool one(vi&xs) {
  rep (i,20) memo[i] = 0;
  for (int x: xs) memo[x]++;

  int m = 0;
  rep (i,20) if (memo[i] == 2) ++m;
  return m == 1;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout.setf(ios::fixed);
  cout.precision(10);
  random_device dev;
  mt19937 rand(dev());

  int a,b,c,d,e;
  char comma;
  while (cin>>a>>comma>>b>>comma>>c>>comma>>d>>comma>>e) {
    vi xs = {a,b,c,d,e};
    sort(begin(xs), end(xs));
    if (fourcard(xs)) {
      cout << "four card" << endl;
    } else if (fullhouse(xs)) {
      cout << "full house" << endl;
    } else if (straight(xs)) {
      cout << "straight" << endl;
    } else if (three(xs)) {
      cout << "three card" << endl;
    } else if (two(xs)) {
      cout << "two pair" << endl;
    } else if (one(xs)) {
      cout << "one pair" << endl;
    } else {
      cout << "null" << endl;
    }
  }

  return 0;
}