// Arup Guha
// 6/9/2023
// Solution to Kattis Problem: International Dates
// https://open.kattis.com/problems/internationaldates

using namespace std;
#include <bits/stdc++.h>

vector<string> getTokens(string line, char delim);
bool isUSDate(int s1, int s2);
bool isEuroDate(int s1, int s2);

int main() {

    string myd;
    cin >> myd;

    // Parse and separate out each piece.
    vector<string> toks = getTokens(myd, '/');
    int s1 = stoi(toks[0]);
    int s2 = stoi(toks[1]);

    // Try both.
    bool us = isUSDate(s1,s2);
    bool euro = isEuroDate(s1,s2);

    // Output appropriately, just check both case first.
    if (us && euro) cout << "either" << endl;
    else if (us)    cout << "US" << endl;
    else            cout << "EU" << endl;

    return 0;
}

// Returns true iff s1/s2 is a valid US date.
bool isUSDate(int s1, int s2) {
    if (s1 < 1 || s1 > 12) return false;
    if (s2 < 1 || s2 > 31) return false;
    return true;
}

// Returns true iff s1/s2 is a valid EU date.
bool isEuroDate(int s1, int s2) {
    if (s1 < 1 || s1 > 31) return false;
    if (s2 < 1 || s2 > 12) return false;
    return true;
}

/*** Prewritten parsing code ***/
vector<string> getTokens(string line, char delim) {

    vector<string> res;

    string cur = "";
    int i = 0;
    while (i < line.size()) {

        // Get to string start.
        while (i<line.size() && line[i] == delim) i++;
        int j = i;

        // Get to string end.
        while (j<line.size() && line[j] != delim) {
            cur += line[j];
            j++;
        }

        // Add this string.
        res.push_back(cur);
        cur = "";
        i = j+1;
    }

    return res;
}
