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] == v[10] && v[11] == v[12] && v[13] == v[1] && v[1] == v[11])||(st == 4)){
      return "straight";
    }
  }
  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<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a;  i ++)
int main(void){
  vector<int> array(5);
  vector<int> original;
  vector<int> card(15);
  string s;  
  while(cin>>s){
    rep(i,5)array[i]=0;
    rep(i,15)card[i]=0;
    for(int i = 0, j = 0 ; i < s.size() ; i ++){
      if(s[i] == ','){
	j++;continue;
      }
      array[j] = array[j] * 10 +s[i]-'0';
    }
    rep(i,5){
      card[array[i]]++;
      if(array[i] == 1)card[14]++;
    }

    original = card;
    sort(card.begin(),card.end(),greater<int>());
    
    //rep(i,5)cout<<card[i]<<endl;
    if(
       (card[0 ] == 1 && card[1 ] == 1 && card[2 ] == 1 && card[3 ] == 1 && card[4] == 1 ) 
       ){
      int cnt = 0;
      rep(i,15){
	//cout<<original[i]<<" "<<cnt<<endl;;
	if(cnt == 4) break;
	if(original[i] == original[i+1] && original[i] != 0 )cnt ++;
	else cnt = 0;
      }
      if(cnt == 4)cout<<"straight"<<endl;
      else cout<<"null"<<endl;
     
      continue;
    }
    sort(array.begin(),array.end());
    switch(card[0]){
    case 4:
      cout<<"four card"<<endl;break;
    case 3:
      if(card[1]==2){
	cout<<"full house"<<endl;
      }else{
	cout<<"three card"<<endl;
      }
      break;
    case 2:
      if(card[1]==2){
	cout<<"two pair"<<endl;
      }else{
	cout<<"one pair"<<endl;
      }
      break;
    default:
      cout<<"null"<<endl;
    }
  }
}

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

vector<string> split(const string &str, char delim){
  istringstream iss(str); string tmp; vector<string> res;
  while(getline(iss, tmp, delim)) res.push_back(tmp);
  return res;
}



bool forcard(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans >= 4) return true;
		ans = 1;
	}
	return false;
}

bool fullhouse(vector<int> card){

		for(int i=0,k;i<5;i++){
			int x = card[i],y; int ansx =1,ansy=1;
			for(k=0;k<5;k++) if(card[k] != x){ y = card[k]; break;};
			for(int j=0;j<5;j++){
				if(i!=j){
					if(x == card[j]) ansx++;
				}
				if(k!=j){
					if(y == card[j]) ansy++;
				}
			}
			if(ansx == 3 && ansy ==2) return true;
			if(ansx == 2 && ansy ==3) return true;
		}
		return false;
}

bool straight(vector<int> card){
	int ans = 1;
	if(card[0] != 1){
		for(int i=0;i+1<5;i++){
			if(card[0]+i+1 == card[i+1]) ans++;
		}
		if(ans==5) return true;
	} else {
		for(int i=0;i+1<4;i++){
			if(card[1]+i+1 == card[i+2]) ans++;
		}
		if(card[4] == 13 && ans == 4) return true;
	}
	return false;
}

bool threecard(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans == 3) return true;
		ans = 1;
	}
	return false;
}

bool twopair(vector<int> card){

		for(int i=0,k;i<5;i++){
			int x = card[i],y; int ansx =1,ansy=1;
			for(k=0;k<5;k++) if(card[k] != x){ y = card[k]; break;};
			for(int j=0;j<5;j++){
				if(i!=j){
					if(x == card[j]) ansx++;
				}
				if(k!=j){
					if(y == card[j]) ansy++;
				}
			}
			if(ansx == 2 && ansy ==2) return true;
		}
		return false;
}

bool onepair(vector<int> card){
	int ans =1;
	for(int i=0;i<5;i++){
		int x = card[i];
		for(int j=0;j<5;j++){
			if(i!=j){
				if(x == card[j]) ans++;
			}
		}
		if(ans == 2) return true;
		ans = 1;
	}
	return false;
}
string poker(vector<int> card){
	if(forcard(card)) return "four card";
	if(fullhouse(card)) return "full house";
	if(straight(card)) return "straight";
	if(threecard(card)) return "three card";
	if(twopair(card)) return "two pair";
	if(onepair(card)) return "one pair";
	return "null";
}


int main(){
	string str; vector<string> st; vector<int> card;
	while(cin >> str){
		st = split(str,',');
		for(int i=0;i<5;i++){
			stringstream ss; int a;
			ss << st[i];
			ss >> a;
			card.push_back(a);
		}
		sort(card.begin(),card.end());
		cout << poker(card) << endl;

		card.clear();
	}

}