import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] v = sc.nextLine().split(" ");
        String[] s1 = v[0].split("[.]");
        String[] s2 = v[1].split("[.]");
        int len = Math.min(s1.length, s2.length);//子版本号可能不齐全
        for(int i = 0; i < len; ++i){
            if(s1[i].equals(s2[i])) continue;
            if(Integer.valueOf(s1[i]) < Integer.valueOf(s2[i])){
                System.out.println(-1);
                return;
            }else{
                System.out.println(1);
                return;
            }
        }
        if(s1.length > s2.length){//缺失子版本号的部分默认为0,所以长的更大
            System.out.println(1);
            return;
        }else if(s1.length < s2.length){
            System.out.println(-1);
            return;
        }
        System.out.println(0);
    }
}