#include<stdio.h>
int fuzzyStrcmp(char s[],char t[]);
int main(void){
    int ans;
    char s[100];
    char t[100];
    scanf("%s %s",s,t);
    printf("%s = %s -> ",s,t);
    ans=fuzzyStrcmp(s,t);
    printf("%d\n",ans);
    return 0;
}
int fuzzyStrcmp(char s[],char t[]){
    int p=0,cont1=0,cont2=0;
    while(s[cont1]!='\0'){
        cont1++;
    }
    while(t[cont2]!='\0'){
        cont2++;
    }   
    if(cont1 != cont2){
        return 0;
    }

    while(s[p]!='\0' || t[p]!='\0'){
        if(s[p]==t[p] || ((65<=s[p] && s[p]<=90) && s[p]+32==t[p]) || ((65<=t[p] && t[p]<=90) && s[p]==t[p]+32)){
        }else{
            return 0;
        }
        p++;
    }
    return  1;
}
