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 <cstdio>
#include <algorithm>

using namespace std;

bool fourcard(int h[5]) {
	if ((h[0] == h[1] && h[0] == h[2] && h[0] == h[3]) ||
		(h[4] == h[1] && h[4] == h[2] && h[4] == h[3]) )
		return true;
	return false;
}

bool fullhouse(int h[5]) {
	if ((h[0] == h[1] && h[0] == h[2] && h[3] == h[4]) ||
		(h[0] == h[1] && h[4] == h[2] && h[4] == h[3]) )
		return true;
	return false;
}

bool straight(int h[5]) {
	if (h[0] == 1 && h[1] != 2) {
		for (int i = 1; i < 5; i++)
			if (h[i] != i + 9)
				return false;
	}
	else {
		for (int i = 0; i < 4; i++)
			if (h[i] + 1 != h[i+1])
				return false;
	}
	return true;
}

bool threecard(int h[5]) {
	for (int i = 0; i < 3; i++)
		if (h[i] == h[i+1] && h[i] == h[i+2])
			return true;
	return false;
}

int pairs(int h[5]) {
	int ret = 0;
	for (int i = 0; i < 4; i++)
		if (h[i] == h[i+1]) {
			ret++;
			i++;
		}
	return ret;
}

int main() {
	int h[5];
	while (scanf("%d,%d,%d,%d,%d", &h[0], &h[1], &h[2], &h[3], &h[4]) != EOF) {
		sort(h, h + 5);
		for (int i = 0; i < 5; i++)
			printf("%d ", h[i]);
		printf("\n");
		if (fourcard(h)) printf("four card\n");
		else if (fullhouse(h)) printf("full house\n");
		else if (straight(h)) printf("straight\n");
		else if (threecard(h)) printf("three card\n");
		else {
			int n = pairs(h);
			switch (n) {
				case 0: printf("null\n"); break;
				case 1: printf("one pair\n"); break;
				case 2: printf("two pair\n"); break;
			}
		}
	}
	return 0;
}

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

#define same2(a,b) (c[a]==c[b])
#define same3(a,b,c) (same2(a,b)&&same2(b,c))
#define same4(a,b,c,d) (same3(a,b,c)&&same2(c,d))
int c[5];

bool four_card(){
	if(same4(0,1,2,3)||same4(1,2,3,4)){
		return 1;
	}
	return 0;
}

bool full_house(){
	if((same3(0,1,2)&&same2(3,4)) || (same2(0,1)&&same3(2,3,4))){
		return 1;
	}else{
		return 0;
	}
}

bool straight(){
	bool res=1;
	for(int i=0;i<4;i++){
		if((c[i]+1)!=c[i+1])res=0;
	}
	if((res==0) && (c[0]==1) && (c[1]==10)){
		res=1;
		for(int i=1;i<4;i++){
			if((c[i]+1)!=c[i+1])res=0;
		}
	}
	return res;
}

bool three_card(){
	if(same3(0,1,2)||same3(1,2,3)||same3(2,3,4)){
		return 1;
	}else{
		return 0;
	}
}

bool two_pair(){
	int p=0;
	for(int i=0;i<4;i++){
		if(same2(i,i+1)){
			p++;
		}
	}
	if(p==2){
		return 1;
	}else{
		return 0;
	}
}

bool one_pair(){
	if(same2(0,1)||same2(1,2)||same2(2,3)||same2(3,4)){
		return 1;
	}else{
		return 0;
	}
}

int main(){
	while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
		sort(c,c+5);
		if(four_card()){
			cout<<"four card"<<endl;
		}else if(full_house()){
			cout<<"full house"<<endl;
		}else if(straight()){
			cout<<"straight"<<endl;
		}else if(three_card()){
			cout<<"three card"<<endl;
		}else if(two_pair()){
			cout<<"two pair"<<endl;
		}else if(one_pair()){
			cout<<"one pair"<<endl;
		}else{
			cout<<"null"<<endl;
		}
	}
}

C++: while 1:
	try: p=sorted(list(map(int,input().split(','))))
	except: break
	if (p[0] == p[3]) or (p[1] == p[4]): 
		print('four card')
	elif p[0] == p[2] or p[1] == p[3] or p[2] == p[4]:
		print('three card')
	elif (p[0] == p[1] == p[2] and p[3] == p[4]) or (p[0] == [1] and p[2] == p[3] == p[4]):
		print('full house')
	elif (p[0] == p[1] and p[2] == p[3]) or (p[1] == p[2] and p[3] == p[4]):
		print('two pair')
	elif p[0] == p[1] or p[1] == p[2] or p[3] == p[4]:
		print('one pair')
	elif p[0] == p[1]-1 and p[1] == p[2]-1 and p[2] == p[3]-1 and p[3] == p[4]-1 and p[4] == p[3]+1:
		print('straight')
	elif p[0] == 1 and p[1] == 10 and p[2] == 11 and p[3] == 12 and p[4] == 13:
		print('straight')
	else:
		print('null')

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

using namespace std;

class poker{
public:
	int cardCnt[13] = {0};
	string audit;
	poker(int c[5]){
		for(int i = 0;i < 5;i++){
			cardCnt[c[i] - 1]++;
		}
		if(fourCard()){
			audit = "four card";
		}else if(fullHouse()){
			audit = "full house";
		}else if(straight()){
			audit = "straight";
		}else if(threeCard()){
			audit = "three card";
		}else if(twoPair()){
			audit = "two pair";
		}else if(onePair()){
			audit = "one pair";
		}else{
			audit = "null";
		}
	}
private:
	bool onePair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 1;
	}
	bool twoPair(){
		int pairCnt = 0;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 2){
				pairCnt++;
			}
		}
		return pairCnt == 2;
	}
	bool threeCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				return true;
			}
		}
		return false;
	}
	bool straight(){
		const int exception[] = {1,0,0,0,0,0,0,0,0,1,1,1,1};
		for(int i = 0;i < 10;i++){
			if(cardCnt[i] == 1 && cardCnt[i + 1] == 1 && cardCnt[i + 2] == 1 && cardCnt[i + 3] == 1 && cardCnt[i + 4] == 1){
				return true;
			}
		}
		for(int i = 0;i < 13;i++){
			if(exception[i] != cardCnt[i]){
				return false;
			}
		}
		return true;
	}
	bool fullHouse(){
		bool b1 = false, b2 = false;
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 3){
				b1 = true;
			}else if(cardCnt[i] == 2){
				b2 = true;
			}
		}
		return b1 && b2;
	}
	bool fourCard(){
		for(int i = 0;i < 13;i++){
			if(cardCnt[i] == 4){
				return true;
			}
		}
		return false;
	}
};

int main(void){
	int crd[5];
	while(1){
		if(cin.eof()){
			break;
		}
		for(int i = 0;i < 5;i++){
			cin >> crd[i];
			cin.get();
		}
		poker p(crd);
		cout << p.audit << endl;
	}
}