#12755: AC code


bert30702 (bert30702)


#include <bits/stdc++.h>
int main(){
    int t = 0, k; scanf("%d", &k);
    while(k--){
        std::string a, b; std::cin >> a >> b;
        int x = 0, y = 0;
        for(auto it: a) x = x * 2 + it - '0';
        for(auto it: b) y = y * 2 + it - '0';
        if(std::__gcd(x, y) != 1)
        printf("Pair #%d: All you need is love!\n", ++t);
        else printf("Pair #%d: Love is not all you need!\n", ++t);
    }
}