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<stdio.h>

int main (){
	
	int card[6];
	int temp=0;
	int index;
	int i, j;
	
	while(scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4])!=EOF){
		do{
			for(j=0;j<5;j++){
				for(i=0;i<5-1;i++){
					if(card[i]>card[i+1]){
						index=card[i+1];
						card[i+1]=card[i];
						card[i]=index;
					}
				}
			}
		} while (card[j]>card[j+1]);
	if((card[0]==card[1] && card[1]==card[2] && card[3]==card[4]) || (card[0]==card[1] && card[2]==card[3] && card[3]==card[4])){
		printf("full house\n");}
	else if((card[0]==card[1] && card[1]==card[2] && card[2]==card[3]) || (card[1]==card[2] && card[2]==card[3] && card[3]==card[4])){
		printf("four card\n");}
	else if((card[0]==card[1] && card[1]==card[2]) || (card[1]==card[2] && card[2]==card[3]) || (card[2]==card[3] && card[3]==card[4])){
		printf("three card\n");}
	else if((card[0]==card[1] && card[2]==card[3]) || (card[0]==card[1] && card[3]==card[4]) || (card[1]==card[2] && card[2]==card[3])){
		printf("two pair\n");}
	else if(card[0]==card[1] || card[1]==card[2] || card[2]==card[3] || card[3]==card[4]){
		printf("\none pair\n");}
	else if((card[0]==card[1]-1 && card[1]==card[2]-1 && card[2]==card[3]-1 && card[3]==card[4]-1) || 
			(card[0]==1 && card[1]==card[2]-1 && card[2]==card[3]-1 && card[3]==card[4]-1)){
		printf("stright\n");}
	else printf("null\n");
	}
	
	return 0;
}

C++: #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <utility>
#include <numeric>

using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

const ullong MOD = 1000000000 + 7;

int main()
{
	string s;
	for (; cin >> s;)
	{
		vector<int> a(14);

		stringstream ss;
		ss << s;

		for (int i = 0; i < 5; i++)
		{
			int x;
			ss >> x;

			a.at(x - 1)++;
			if (x == 1)
			{
				a.at(13)++;
			}

			ss.ignore();
		}

		int maxn = 0;
		int cnt = 0;
		int len = 0;
		bool str = false;
		for (int i = 0; i < 14; i++)
		{
			if (a.at(i) > 0)
			{
				maxn = max(maxn, a.at(i));
				if (i < 13)
				{
					cnt++;
				}
				len++;
				if (len >= 5)
				{
					str = true;
				}
			}
			else
			{
				len = 0;
			}
			
		}

		if (maxn == 4)
		{
			cout << "four card" << endl;
		}
		else if (maxn == 3)
		{
			if (cnt == 2)
			{
				cout << "full house" << endl;
			}
			else
			{
				cout << "three card" << endl;
			}
		}
		else if (maxn == 2)
		{
			if (cnt == 3)
			{
				cout << "two pair" << endl;
			}
			else
			{
				cout << "one pair" << endl;
			}
		}
		else
		{
			if (str)
			{
				cout << "straight" << endl;
			}
			else
			{
				cout << "null" << endl;
			}
		}
	}
}

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

bool isChain( int* num, int i, int r ){
	if ( i >= 15 ) return false;
	if ( num[ i ] == 1 ){
		r -= 1;
		if ( !r ){
			return true;
		}else{
			return isChain( num, i+1, r );
		}
	}
	return false;
}


string checkHand( int* c ){
	int number[ 15 ] = {0};
	int max1 = 0, max1num = 0, max2 = 0, max2num = 0;

	for ( int i = 0; i < 5; ++i ){
		int n = c[ i ];
		++number[ n ];
		if ( number[ n ] > max1 ){
			if ( n == max1num ){
				max1 = number[ n ];
				max1num = n;
			}else{
				max2 = max1;
				max2num = max1num;
				max1 = number[ n ];
				max1num = n;
			}
		}else if ( number[ n ] > max2 ){
			max2 = number[ n ];
			max2num = n;
		}
		if ( n == 1 ) ++number[ 14 ];
	}

	if ( max1 == 4 ){
		return "four card";
	}else if ( max1 == 3 ){
		if ( max2 == 2 ){
			return "full house";
		}else{
			return "three card";
		}
	}else if ( max1 == 2 ){
		if ( max2 == 2 ){
			return "two pair";
		}else{
			return "one pair";
		}
	}

	for ( int i = 1; i <= 10; ++i ){
		if ( number[ i ] == 1 ){
			if ( isChain( number, i+1, 5-1 ) ){
				return "straight";
			}
		}
	}


	return "null";
}

int main(){
	int card[ 5 ];
	char c;

	while ( cin >> card[ 0 ] >> c >> card[ 1 ] >> c >> card [ 2 ] >> c
				>> card[ 3 ] >> c >> card[ 4 ] ){

		cout << checkHand( card ) << endl;

	}
	return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){
  int p[5],c[14],p2,p3,p4;
  while(scanf("%d,%d,%d,%d,%d",p,p+1,p+2,p+3,p+4)!=EOF){
    for(int i=1;i<14;i++) c[i] = 0;
    p2 = 0;
    p3 = 0;
    p4 = 0;
    for(int i=0;i<5;i++) c[ p[i] ]++;
    for(int i=1;i<14;i++){
      if(c[i]==2) p2++;
      if(c[i]==3) p3++;
      if(c[i]==4) p4++;
    }
    if(p4 == 1) puts("four card");
    else if(p3 == 1){
      if(p2 == 1) puts("full house");
      else puts("three card");
    } else if(p2 == 2) puts("two pair");
    else if(p2 == 1) puts("one pair");
    else {
      sort(p,p+5);
      if(p[4]-p[0]==4||p[0]==1&&p[1]==10) puts("straight");
      else puts("null");
    }
  }
  return(0);
}