#include <iostream>
using namespace std;
int main() {
int a, b, ansa, ansb, copie, copieb;
cin >> a >> b;
copiea = a;
copieb = b;
ansa = 0;
while (a > 0) {
ansa += a % 10;
a /= 10;
}
ansb = 0;
while (b > 0) {
ansb += b % 10;
b /= 10;
}
if (ansa > ansb) {
cout << copiea << "\n";
} else if (ansa < ansb) {
cout << copieb << "\n";
} else {
cout << "Numerele sunt egale.\n";
}
return 0;
}