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

using namespace std;



int main(){
	int a,b,c,d,e,table[14],pair,three,four;
	bool st_FLG;

	while(scanf("%d,%d,%d,%d,%d",&a,&b,&c,&d,&e) != EOF){
		for(int i=1;i <= 13;i++)table[i] = 0;
		pair = three = four = 0;
		st_FLG=false;
		table[a]++;
		table[b]++;
		table[c]++;
		table[d]++;
		table[e]++;

		for(int i=1;i<=13;i++){
			if(table[i] == 2)pair++;
			else if(table[i] == 3)three++;
			else if(table[i] == 4)four++;
			if(i >= 5 && table[i] == 1 && table[i-1] == 1 && table[i-2] == 1 && table[i-3] == 1 && table[i-4]== 1)
				st_FLG = true;
		}

		if(four == 1){
			printf("four card\n");
		}else if(pair == 1 && three == 1){
			printf("full house\n");
		}else if(three == 1){
			printf("three card\n");
		}else if(pair == 2){
			printf("two pair\n");
		}else if(pair == 1){
			printf("one pair\n");
		}else if((st_FLG == true) || (table[10] == 1 && table[11] == 1 && table[12] == 1 && table[13] == 1 && table[1] == 1)){
			printf("straight\n");
		}else{
			printf("null\n");
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int a[5];
  char c;
  while (cin >> a[0]) {
    for (int i = 1; i < 5; i++) {
      cin >> c >> a[i];
    }
    sort(a, a + 5);
    map<int, int> mp;
    for (int i = 0; i < 5; i++) {
      mp[a[i]]++;
    }
    int cnt = 0;
    for (auto i : mp) cnt = max(cnt, i.second);
    if (mp.size() == 2 && cnt == 4) {
      cout << "four card" << endl;
    } else if (mp.size() == 2 && cnt == 3) {
      cout << "full house" << endl;
    } else if (mp.size() == 3 && cnt == 3) {
      cout << "three card" << endl;
    } else if (mp.size() == 3 && cnt == 2) {
      cout << "two pair" << endl;
    } else if (mp.size() == 4) {
      cout << "one pair" << endl;
    } else {
      bool flag = true;
      for (int i = 1; i + 1 < 5; i++) {
        flag &= a[i + 1] - a[i] == 1;
      }
      if (flag && ((a[0] == 1 && a[1] == 10) || (a[1] - a[0] == 1))) {
        cout << "straight" << endl;
      } else {
        cout << "null" << endl;
      }
    }
  }

  return 0;
}

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

using namespace std;
int a[5];
bool is_straight()
{
  for (int i = 1; i < 5; i++) {
    if (a[i] != a[i - 1] + 1) {
      goto next;
    }
  }
  return true;
 next:
  if (a[0] == 1 && a[1] == 10 && a[2] == 11 && a[3] == 12 && a[4] == 13) {
    return true;
  }
  return false;
}


int main()
{
  while (scanf("%d" , &a[0]) == 1) {
    for (int i = 1; i < 5; i++) {
      scanf(",%d", &a[i]);
    }
    sort(a, &a[5]);
    /*for (int i = 0; i < 5; i++) {
      printf("%d ", a[i]);
    }
    printf("\n");*/
    vector<int> mx_v;
    int mx = 1;
    for (int i = 1; i < 5; i++) {
      if (a[i] == a[i - 1]) {
	mx++;
      } else {
	mx_v.push_back(mx);
	mx = 1;
      }
    }
    mx_v.push_back(mx);
    mx = *max_element(mx_v.begin(), mx_v.end());
    //printf("mx = %d\n", mx);
    if (mx == 1) {
      if (is_straight()) {
	printf("straight\n");
	goto end;
      } else {
	printf("null\n");
	goto end;
      }
    } else if (mx == 2) {
      int c = 0;
      for (int i = 0; i < mx_v.size(); i++) {
	if (mx_v[i] == mx) {
	  c++;
	}
      }
      if (c == 2) {
	printf("two pair\n");
	goto end;
      } else {
	printf("one pair\n");
	goto end;
      }
    } else if (mx == 3) {
      for (int i = 0;  i< mx_v.size(); i++) {
	if (mx_v[i] == 2) {
	  printf("full house\n");
	  goto end;
	}
	printf("three card\n");
	goto end;
      }
    } else if (mx == 4) {
      printf("four card\n");
      goto end;
    }
  end:;
  }
}

C++: #include <stdio.h>
#include <stdcomp.h>
#include <algorithm.h>

using namespace std;

int main(void)
{
	int card[5];
	int count1;
	int count2;
	int straight;
	int i;
	int j;
	char conma;
	
	while (scanf("%d", &card[0]) != EOF){
		for (i = 1; i < 5; i++){
			scanf("%c %d", &conma, &card[i]);
		}
		sort(card, card + 5);
		count1 = 0;
		count2 = 0;
		straight = 0
		
		for (i = 0; i < 4; i++){
			if (card[i] + 1 == card[i + 1]){
				straight++;
			}
			if (card[i] == card[i + 1] && card[i] == card[0]){
				count1++;
			}
			else if (card[i]  == card[i + 1] && card[i] != card[0]){
				count2++;
			}
		}
		
		if ((count1 == 1 && count2 == 0) || (count1 == 0 && count2 == 1)){
			printf("one pair\n");
		}
		else if (count1 == 1 && count1 == count2){
			printf("two pair\n");
		}
		else if (count1 == 2 || count2 == 2){
			printf("three card\n");
		}
		else if (straight == 4){
			printf("straight\n");
		}
		else if (count1 == 3 || count2 == 3){
			printf("four card\n");
		}
		else {
			printf("null\n");
		}
	}
	
	return 0;
}