intfoo(char*s1){intl=strlen(s1);l--;intf=1;intsum=0;while(l>=0){sum=sum+(s1[l]-'0')*f;l--;f=f*2;}returnsum;}intgcd(inta,intb){returnb==0?a:gcd(b,a%b);}intmain(intargc,charconst*argv[]){intn;charstr1[35];charstr2[35];while(scanf("%d",&n)!=EOF){for(inti=1;i<=n;i++){scanf("%s",str1);scanf("%s",str2);ints1=foo(str1);ints2=foo(str2);if(gcd(s1,s2)>1){printf("Pair #%d: All you need is love!\n",i);}else{printf("Pair #%d: Love is not all you need!\n",i);}}}return0;}