#include #include #include using namespace std; int main() { vector hist_ans = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; vector hist_in( 10 ); fill( hist_in.begin(), hist_in.end(), 0 ); string line; getline( cin, line ); for ( char ch : line ) { if ( '0' <= ch && ch <= '9' ) { hist_in[ ch - '0' ]++; } } int a, b; for ( int i = 0; i <= 9; i++ ) { if ( hist_ans[ i ] < hist_in[ i ] ) { a = i; } else if ( hist_ans[ i ] > hist_in[ i ] ) { b = i; } } cout << a << " " << b << endl; }