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 <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;

int main(){
	int c[5];
	while( scanf(" %d,%d,%d,%d,%d", &c[0], &c[1], &c[2], &c[3], &c[4]) != EOF ){
		sort(c, c+5);
		
		//four card
		bool flag=true;
		for(int i=0; i<=2; ++i){
			if(c[i] != c[i+1]) flag=false;
		}
		if(flag){
			printf("four card\n");
			continue;
		}
		flag=true;
		for(int i=1; i<=3; ++i){
			if(c[i] != c[i+1]) flag=false;
		}
		if(flag){
			printf("four card\n");
			continue;
		}
		
		//full house
		flag=false;
		if(c[0]==c[1] && c[2]==c[3] && c[3]==c[4]) flag=true;
		if(c[0]==c[1] && c[1]==c[2] && c[3]==c[4]) flag=true;
		if(flag){
			printf("full house\n");
			continue;
		}
	
		//straight
		for(int i=1; i<=9; ++i){
			flag=true;	
			for(int j=0; j<=4; ++j){
				if(c[j]!=i+j) flag=false;
			}
			if(flag) break;
		}
		if(c[0]==1){
			flag=true;
			for(int i=1; i<=4; ++i){
				if(c[i]!=9+i) flag=false;	
			}	
		}
		if(flag){
			printf("straight\n");
			continue;
		}
		
		//three card
		flag=false;
		for(int i=0; i<=2; ++i)
			if(c[i]==c[i+1] && c[i+1]==c[i+2]) flag=true;
		if(flag){
			printf("three card\n");
			continue;
		}	
		
		//two pair
		flag=false;
		if(c[0]==c[1] && c[2]==c[3]) flag=true;
		if(c[0]==c[1] && c[3]==c[4]) flag=true;
		if(c[1]==c[2] && c[3]==c[4]) flag=true;
		if(flag){
			printf("two pair\n");
			continue;
		}	

		//one pair
		flag=false;
		for(int i=0; i<=3; ++i)
			if(c[i]==c[i+1]) flag=true;		
	
		if(flag){
			printf("one pair\n");
			continue;
		}	

		//null
		printf("null\n");
	}
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(void){
  vector<int> hands;
  int tmp;

  while(cin >> tmp){
	hands.push_back(tmp);
	cin.ignore();
	cin >> tmp;
	hands.push_back(tmp);
	cin.ignore();
	cin >> tmp;
	hands.push_back(tmp);
	cin.ignore();
	cin >> tmp;
	hands.push_back(tmp);
	cin.ignore();
	cin >> tmp;
	hands.push_back(tmp);

	sort(hands.begin(), hands.end());
	if(hands[0] == hands[3] || hands[1] == hands[4]){ //four card
	  cout << "four card" << endl;
	}else if((hands[0] == hands[1] && hands[2] == hands[4]) ||
			 (hands[0] == hands[2] && hands[3] == hands[4])){ //full house
	  cout << "full house" << endl;
	}else if((hands[0]+1 == hands[1] && hands[1]+1 == hands[2] && hands[2]+1 == hands[3] && hands[3]+1 == hands[4]) ||
			 (hands[0] == 1 && hands[1] == 10 && hands[2] == 11 && hands[3] == 12 && hands[4] == 13)){
	  cout << "straight" << endl;
	}else if(hands[0] == hands[2] || hands[1] == hands[3] || hands[2] == hands[4]){//three cards
	  cout << "three card" << endl;
	}else if((hands[0] == hands[1] && (hands[2] == hands[3] || hands[3] == hands[4])) || (hands[1] == hands[2] && hands[3] == hands[4])){//two pairs
	  cout << "two pair" << endl;
	}else if(hands[0] == hands[1] || hands[1] == hands[2] || hands[2] == hands[3] || hands[3] == hands[4]){
	  cout << "one pair" << endl;
	}else{
	  cout << "null" << endl;
	}

	hands.clear();
  }


  return 0;
}

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){
	map<int,int> count;
	FOR(i,1,14){
		count[i] = 0;
	}
	rep(i,5){
		count[nums[i]]++;
	}
	
	bool is2 = false;
	bool is3 = false;
	int c=0;
	int mc=0;
	string ret="";
	foreach(it,count){
		if(it->second>0){
			c++; 
			mc=max(mc,c);
		}else{
			c=0;
		}
		if(it->second==4){
			ret = "four card";
			break;
		}else if(it->second==3){
			is3 = true;
		}else if(it->second==2){
			if(is3){
				ret = "full house";
				break;
			}else if(is2){
				ret = "two pair";
				break;
			}else{
				is2 = true;
			}
		}
	}
	if(mc==5){
		return "straight";
	}else if(ret!=""){
		return ret;
	}else 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<iostream>
#include<vector>
#include<algorithm>

enum Role
{
	NoRole,
	Onepair,
	TwoPair,
	ThreeCard,
	Straight,
	FullHouse,
	FourCard
};

std::vector<int> CountSameCard(std::vector<int> card)
{
	std::vector<int> count(5);

	std::sort(card.begin(),card.end());

	int memory =card[0];

	int j=0;

	for(size_t i=1; i<5; ++i)
	{
		if(card[i]==memory)
		{
			count[j] += 1;
		}
		else
		{
			++j;
		}

		memory = card[i];
	}

	std::sort(count.begin(), count.end());

	return count;
}

bool JudgeStraight(std::vector<int> card)
{
	const int SpecialStraight[5]=
	{
		1,
		10,
		11,
		12,
		13,
	};

	std::sort(card.begin(),card.end());

	int memory = card[0];

	size_t i = 1;

	for(; i<5; ++i)
	{
		if(!(card[i]==memory+1))
		{
			break;
		}

		memory = card[i];
	}

	size_t j=0;

	for(; j<5; ++j)
	{
		if(card[j]!=SpecialStraight[j])
		{
			break;
		}
	} 

	return (i==5) || (j==5);
}

Role JudgeRole(std::vector<int> count, bool straight)
{
	std::sort(count.begin(),count.end());

	int max = *max_element(count.begin(),count.end());

	if(max==3)
	{
		return FourCard;
	}

	if(max==2)
	{
		if(count[3]==1)
		{
			return FullHouse;
		}
	}

	if(straight)
	{
		return Straight;
	}

	if(max==2)
	{
		return ThreeCard;
	}


	if(max==1)
	{
		if(count[3]==1)
		{
			return TwoPair;
		}

		return Onepair;
	}
	else
	{
		return NoRole;
	}
}


int main()
{
	std::vector<int> card(5);

	char c;

	while(std::cin >> card[0] >> c >> card[1] >> c >> card[2] >> c >> card[3] >> c >> card[4])
	{
		switch(JudgeRole(CountSameCard(card),JudgeStraight(card)))
		{
		case FourCard:
			std::cout << "four card\n";
			break;
		case FullHouse:
			std::cout << "full house\n";
			break;
		case Straight:
			std::cout << "straight\n";
			break;
		case ThreeCard:
			std::cout << "three card\n";
			break;
		case TwoPair:
			std::cout << "two pair\n";
			break;
		case Onepair:
			std::cout << "one pair\n";
			break;
		case NoRole:
			std::cout << "null\n";
			break;
		}
	}
}