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[2]==c[3] && 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 <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	vector<int> c(5);
	char a;
	while(cin >> c[0] >> a >> c[1] >> a >> c[2] >> a >> c[3] >> a >> c[4]){
		bool yaku=false;
		int cnt[5]={0};
		sort(c.begin(),c.end());
		if((c[0]==(c[1]-1) && c[0]==(c[2]-2) && c[0]==(c[3]-3) && c[0]==(c[4]-4)) || (c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13)) {cout << "straight" << endl ; continue;} 
		for(int i=0;i<5;++i){
			for(int j=i+1;j<5;++j){
				if(c[i]==c[j] && c[i]!=-1) cnt[i]++, c[j]=-1; 
			}
		}
		for(int i=0;i<5;++i){
			
			if(cnt[i]==3) {cout << "four card" << endl;yaku=true; break;}
			if(cnt[i]==2) {
				if(cnt[3]==1) {cout << "full house" << endl; yaku=true; break;}
				else {cout << "three card" << endl ; yaku=true; break;}
			}
			if(cnt[i]==1) {
				if(cnt[2]==2) {cout << "full house" << endl;  yaku=true; break;}
				else if (cnt[2]==1) {cout << "two pair" << endl; yaku=true; break;}
				else {cout << "one pair" << endl;yaku=true;  break;} 
			}
		}
		if(!yaku){
			cout << "null" << endl;
		}
		
	}
	return 0; 
}

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

int main() {
	int num[5];
	char c;
	while (cin >> num[0]) {
		for (int i = 1; i < 5; i++) {
			cin >> c >> num[i];
		}
		sort(num, num + 5);
		int pair[2] = {}, cont = 0;
		for (int i = 1, j = 0; i < 5; i++) {
			if (num[i] == num[i - 1]) pair[j]++;
			else if (pair[j]) j++;
			if (num[i] == num[i - 1] + 1) cont++;
		}
		if (cont == 4) cout << "straight" << endl;
		else if (cont == 3 && num[0] == 1 && num[1] == 10) cout << "straight" << endl;
		else {
			sort(pair, pair + 2);
			if (pair[1] == 3) {
				cout << "four card" << endl;
			}
			else if (pair[1] == 2) {
				if (pair[0] == 1) {
					cout << "full house" << endl;
				}
				else {
					cout << "three card" << endl;
				}
			}
			else if (pair[1] == 1) {
				if (pair[0] == 1) {
					cout << "two pair" << endl;
				}
				else {
					cout << "one pair" << endl;
				}
			}
			else {
				cout << "null" << endl;
			}
		}
	}
}

C++: #include <iostream>

using namespace std;

enum Direction {R, L, U, D};

bool input(int b[])
{
	char dummy;
	for (int i=0; i<5; i++) {
		if ( !(cin >> b[i]) ) return false;
		if (i<4) cin >> dummy;
	}
	return true;
}

void sort5(int a[])
{
	for (int i=0; i<5; i++) {
		for (int j=4; j>i; j--) {
			if (a[j-1] > a[j]) {
				int tmp = a[j];	a[j] = a[j-1]; a[j-1] = tmp;
			}
		}
	}
}

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

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

int main(){
int n[5]={};
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}

for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c>=1){cc=c;c=0;}
else {c=0;}
}

for(int i=0;i<3;i++){
if(n[i+1]!=(n[i]+1))f=false;
}
if(n[0]==1&&n[1]==10&&n[2]==11&&n[3]==12&&n[4]==13)f=true;





if(c==3)printf("four card\n");
else if(c==2&&cc==1)printf("full house\n");
else if(f==true)printf("straight\n");
else if(c==2||cc==2)printf("three card\n");
else if(n[0]==n[1]&&n[2]==n[3])printf("two pair\n");
else if(n[0]==n[1]&&n[3]==n[4])printf("two pair\n");
else if(n[1]==n[2]&&n[3]==n[4])printf("two pair\n");
else if(n[0]==n[1]||n[2]==n[3]||n[1]==n[2]||n[3]==n[4])printf("one pair\n");
else printf("null\n");

c=0,cc=0;f=true;
}
return 0;
}