#include<bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define se second
#define fi first
#define be begin()
#define en end()
#define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
int main()
{
Faster;
string a, b; cin >> a >> b;
int ok1 = 0, ok2 = 0;
if(a[0] == '-') ok1 = 1;
if(b[0] == '-') ok2 = 1;
if(ok1 == 0 && ok2 == 0)
{
if(a.size() > b.size()) cout << 1;
else if(a.size() < b.size()) cout << -1;
else
{
for(int i = 0; i < a.size(); i++)
{
if(a[i] > b[i])
{
cout << 1;
return 0;
}
if(a[i] < b[i])
{
cout << -1;
return 0;
}
}
cout << 0;
}
}
else if(ok1 == 1 && ok2 == 1)
{
a[0] = 0;
b[0] = 0;
if(a.size() > b.size()) cout << -1;
else if(a.size() < b.size()) cout << 1;
else
{
for(int i = 0; i < a.size(); i++)
{
if(a[i] > b[i])
{
cout << -1;
return 0;
}
if(a[i] < b[i])
{
cout << 1;
return 0;
}
}
cout << 0;
}
}
else
{
if(ok1 == 1) cout << -1;
else cout << 1;
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbCAiXG4iCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZwojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIGZpIGZpcnN0CiNkZWZpbmUgYmUgYmVnaW4oKQojZGVmaW5lIGVuIGVuZCgpCiNkZWZpbmUgRmFzdGVyIGNpbi50aWUoMCk7IGNvdXQudGllKDApOyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoKaW50IG1haW4oKQp7CiAgICBGYXN0ZXI7CiAgICBzdHJpbmcgYSwgYjsgY2luID4+IGEgPj4gYjsKICAgIGludCBvazEgPSAwLCBvazIgPSAwOwogICAgaWYoYVswXSA9PSAnLScpIG9rMSA9IDE7CiAgICBpZihiWzBdID09ICctJykgb2syID0gMTsKICAgIGlmKG9rMSA9PSAwICYmIG9rMiA9PSAwKQogICAgewogICAgICAgIGlmKGEuc2l6ZSgpID4gYi5zaXplKCkpIGNvdXQgPDwgMTsKICAgICAgICBlbHNlIGlmKGEuc2l6ZSgpIDwgYi5zaXplKCkpIGNvdXQgPDwgLTE7CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgZm9yKGludCBpID0gMDsgaSA8IGEuc2l6ZSgpOyBpKyspCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGlmKGFbaV0gPiBiW2ldKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNvdXQgPDwgMTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmKGFbaV0gPCBiW2ldKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNvdXQgPDwgLTE7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgY291dCA8PCAwOwogICAgICAgIH0KICAgIH0KICAgIGVsc2UgaWYob2sxID09IDEgJiYgb2syID09IDEpCiAgICB7CiAgICAgICAgYVswXSA9IDA7CiAgICAgICAgYlswXSA9IDA7CiAgICAgICAgaWYoYS5zaXplKCkgPiBiLnNpemUoKSkgY291dCA8PCAtMTsKICAgICAgICBlbHNlIGlmKGEuc2l6ZSgpIDwgYi5zaXplKCkpIGNvdXQgPDwgMTsKICAgICAgICBlbHNlCiAgICAgICAgewogICAgICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgYS5zaXplKCk7IGkrKykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYoYVtpXSA+IGJbaV0pCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY291dCA8PCAtMTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmKGFbaV0gPCBiW2ldKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNvdXQgPDwgMTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBjb3V0IDw8IDA7CiAgICAgICAgfQogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGlmKG9rMSA9PSAxKSBjb3V0IDw8IC0xOwogICAgICAgIGVsc2UgY291dCA8PCAxOwogICAgfQogICAgcmV0dXJuIDA7Cn0K