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 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 <map>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int s[14];
int main(){
	int a,b,c,d,e;
	for(;~scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e);){
		map<int,int>m;
		memset(s,0,sizeof(s));
		m[a]++,m[b]++,m[c]++,m[d]++,m[e]++;
		s[a]=1,s[b]=1,s[c]=1,s[d]=1,s[e]=1;
		vector<int>v;
		for(a=1;a<=9;a++)if(s[a]&&s[a+1]&&s[a+2]&&s[a+3]&&s[a+4]){puts("straight");goto n;}
		if(s[a]&&s[a+1]&&s[a+2]&&s[a+3]&&s[1]){puts("straight");goto n;}
		for(a=1;a<=13;a++)v.push_back(m[a]);
		sort(v.begin(),v.end());
		reverse(v.begin(),v.end());
		if(v[0]==4)puts("four card");
		else if(v[0]==3)puts(v[1]==2?"full house":"three card");
		else if(v[0]==2)puts(v[1]==2?"two pair":"one pair");
		else puts("null");
		n:;
	}
}

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

int main(){
    vector<int> a(5);
    while(~scanf("%d,%d,%d,%d,%d", &a[0], &a[1], &a[2], &a[3], &a[4])){
	sort(a.begin(), a.end());
	if(count(a.begin(), a.end(), a[3]) == 4){
	    cout << "four card" << endl;
	}
	else if(count(a.begin(), a.end(), a[0]) + count(a.begin(), a.end(), a[4]) == 5){
	    cout << "full house" << endl;
	}
	else if(count(a.begin(), a.end(), a[2]) == 3){
	    cout << "three card" << endl;
	}
	else if(count(a.begin(), a.end(), a[1]) + count(a.begin(), a.end(), a[3]) == 4){
	    cout << "two pair" << endl;
	}
	else{
	    
	    for(int i = 0;i < 5;i++){
		if(count(a.begin(), a.end(), a[i]) == 2){
		    cout << "one pair" << endl;
		    goto done;
		}
	    }
	    if(a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13){
		cout << "straight" << endl;
		goto done;
	    }
	    for(int i = 0;i < 5;i++){
		if(a[i] != a[0] + i)break;
		if(i == 4){
		    cout << "straight" << endl;
		    goto done;
		}
	    }
	    cout << "null" << endl;
	}
    done :;
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
 
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) for(int i=s; i<n; i++)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define foreach(it,con) for(auto it=con.begin();it!=con.end();it++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;

string judge(int* nums){
	set<int> st;
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		st.insert(nums[i]);
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	for(auto it=count.begin();it!=count.end();it++){

	}
	if(mc==5){
		return "straight";
	}
	if(is3){
		return "three card";
	}else if(is2){
		return "one pair";
	}
	return "null";
}

int main(){
	int nums[5];
	while(scanf("%d,%d,%d,%d,%d",&nums[0],&nums[1],&nums[2],&nums[3],&nums[4])+1){
		cout << judge(nums) << endl;
	}
	return 0;	
}

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

using namespace std;

int cards[5];
int card[14]={0};


int main()
{
	start:
	while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4])!=EOF)
	{
		fill(card,card+14,0);
		for(int i=0;i<5;i++)
		{
			card[cards[i]-1]++;
			if(cards[i]==1)card[13]++;
		}
		for(int i=0;i<13;i++)
		{
			if(card[i]==4)
			{
				printf("four card\n");
				goto start;
			}
			if(card[i]==3)
			{
				for(int j=0;j<13;j++)
				{
					if(card[j]==2)
					{
						printf("full house\n");
					    goto start;
					}
				}
				printf("three card\n");
					goto start;
			}
		}
		int flag=0;
		for(int i=0;i<13;i++)
		{
			if(card[i]==2)flag++;
		}
		if(flag==2)
		{
			printf("two pair\n");
					goto start;
		}
		if(flag==1)
		{
			printf("one pair\n");
					goto start;
		}
		for(int i=0;i<14;i++)
		{
			int k=1;
			for(int j=0;j<5;j++)
			{
				k*=card[i+j];
			}
			if(k==1)
			{
				printf("straight\n");
				goto start;
			}
		}
		printf("null\n");
		goto start;
	}
	return 0;
}