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<algorithm>
using namespace std;

int main() {
	int ar[5];
	while (scanf("%d,%d,%d,%d,%d", &ar[0], &ar[1], &ar[2], &ar[3], &ar[4])+1) {
		sort(ar, ar + 5);
		int a = ar[0];
		int b = ar[1];
		int c = ar[2];
		int d = ar[3];
		int e = ar[4];

		if (a == d || b == e) { cout << "four card" << endl; }
		else if (a == c && d == e) { cout << "full house" << endl; }
		else if (a == b && c == e) { cout << "full house" << endl; }
		else if (b - a == 1 && c - b == 1 && d - c == 1 && e - d == 1&&a!=1 ) { cout << "straight" << endl; }
		else if (a == 1 && b == 10 && c == 11 && d == 12 && e == 13) { cout << "straight" << endl; }
		else if (a == c || b == d || c == e) { cout << "three card" << endl; }
		else if (a==b&&c==d) { cout << "two pair" << endl; }
		else if (a == b&&d == e) { cout << "two pair" << endl; }
		else if (b == c&&d == e) { cout << "two pair" << endl; }
		else if (a == b || b == c || c == d || d == e) { cout << "one pair" << endl; }
		else { cout << "null" << endl; }
	}
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  int a[5];
  while(~scanf("%d,%d,%d,%d,%d",a,a+1,a+2,a+3,a+4)){
    sort(a,a+5);
    if(a[1]==a[2] && a[2]==a[3] && (a[0]==a[1] || a[3]==a[4])){
      cout<<"four card"<<endl;
    }else if(a[0]==a[1] && a[3]==a[4] && (a[1]==a[2] || a[2]==a[3])){
      cout<<"full house"<<endl;
    }else if((a[0]+1==a[1] && a[1]+1==a[2] && a[2]+1==a[3] && a[3]+1==a[4]) ||
             (a[0]==1 && a[1]==10 && a[2]==11 && a[3]==12 && a[4]==13)){
      cout<<"straight"<<endl;
    }else if((a[0]==a[1] && a[1]==a[2]) || (a[1]==a[2] && a[2]==a[3]) || (a[2]==a[3] && a[3]==a[4])){
      cout<<"three card"<<endl;
    }else if((a[0]==a[1] && (a[2]==a[3] || a[3]==a[4]) || (a[1]==a[2] && a[3]==a[4]))){
      cout<<"two pair"<<endl;
    }else if(a[0]==a[1] || a[1]==a[2] || a[2]==a[3] || a[3]==a[4]){
      cout<<"one pair"<<endl;
    }else{
      cout<<"null"<<endl;
    }
  }
  return 0;
}

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

#define rep(i,n) for(int i = 0; i < n; i++)
#define ll long long
#define EPS 1.0e-8
#define MAX_N 100
typedef pair<int,int> Pii;
typedef pair<int,int> Pis;
const double PI=acos(-1);

bool is_onepair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
	if(count == 1){
		return true;
	}
	
}

bool is_twopair(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			count++;
		}
	}
		if(count == 2){
			return true;
		}
}

bool is_threecard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 3) return true;
	}
}

bool is_straight(int numbers[], map<int,int> freq, int count){

	if(numbers[0] == 11 || numbers[0] == 12 || numbers[0] == 13) return false;

	if(((numbers[0]+1 == numbers[1]) || (numbers[0]+9 == numbers[1])) && numbers[1] + 1 == numbers[2] && numbers[2] + 1 == numbers[3] && numbers[3] + 1 == numbers[4] ) return true;
	return false;
}

bool is_fullhouse(int numbers[], map<int,int> freq, int count){
	count = 0;
	int cnt1 = 0, cnt2 = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 2){
			cnt1++;
		}
		if(freq[i] == 3){
			cnt2++;
		}
	}
		if(cnt1 == 1 && cnt2 == 1){
			return true;
		}
		return false;
}

bool is_fourcard(int numbers[], map<int,int> freq, int count){
	count = 0;
	rep(i,5) freq[numbers[i]]++;
	rep(i,13){
		if(freq[i] == 4){
			count++;
		}
	}
		if(count == 1){
			return true;
		}
		 return false;
}

int main(){
	int numbers[5];
	map<int,int> freq;
	int count = 0;

	
	while(~scanf("%d,%d,%d,%d,%d",&numbers[0],&numbers[1],&numbers[2],&numbers[3],&numbers[4])){

		sort(numbers,numbers+5);

		if(is_fullhouse(numbers, freq, count)) cout << "full house" << endl;
		else if(is_onepair(numbers, freq, count)) cout << "one pair" << endl;
		else if(is_twopair(numbers, freq, count)) cout << "two pair" << endl;		
		else if(is_threecard(numbers, freq, count)) cout << "three card" << endl;
		else if(is_straight(numbers, freq, count)) cout << "straight" << endl;

		else if(is_fourcard(numbers, freq, count)) cout << "four card" << endl;
		else cout << "null" << endl;
	}
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int main() {
  int c[6] = {0},same[5] = {0};

  while(scanf("%d,%d,%d,%d,%d\n",&c[0],&c[1],&c[2],&c[3],&c[4]) == 5) {
    int same[5] = {0};
    int straight = 0;
    for(int i=0;i<5;i++) {
      for(int j=0;j<5;j++) {
	if(c[i] == c[j]) {
	  same[i]++;
	}
      }
    }
    sort(c,c+5);
    sort(same,same+5);
    if(same[4] == 4) {
      cout << "four card" << endl;
    }
    else if(same[4] == 3) {
      if(same[1] == 2) {
	cout << "full house" << endl;
      }
      else {
	cout << "three card" << endl;
      }
    }
    else if(same[4] == 2) {
      if((same[3] == 2) &&(same[2] == 2)) {
	cout << "two pair" << endl;
      }
      else {
	cout << "one pair" << endl;
      }
    }
    else if(same[4] == 1) {
      for(int i=0;i<4;i++) {
	if(c[i] == c[i+1]-1) {
	  straight = 1;
	}
	else {
	  straight = 0;
	  break;
	}
      }
      if((c[0] == 1) && (c[1] == 10)) {
	straight = 1;
      }
      if(straight) {
	cout << "straight" << endl;
      }
      else {
	cout << "null" << endl;
      }
    }

  }
}