#include using namespace std; int main() { vectorVI{ 20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841 }; string S, p; while( cin >> p )S += p; mapMCL; for( auto x : S ) { MCL[x]++; } int b, e; for( auto x : MCL ) { if( x.first != '.' ) { auto y = x.first - '0'; if( VI[y]x.second ) { b = y; } } } cout << b << " " << e << endl; }