import java.util.*;
import java.math.*;
class Main{
public static void main
(String args
[]){ Scanner in
=new Scanner
(System.
in); int tc=0;
tc=in.nextInt();
for(int i=1;i<=tc;i++){
s1=in.next(); // next() exclude space and nextLine() include space take input
s2=in.next();
int comp=b1.compareTo(b2);
if(comp>0){
if(b1.gcd(b2).intValue() !=1){
prln("Pair #"+i+": All you need is love!" );
}
else
prln("Pair #"+i+": Love is not all you need!" );
}
else if( comp<0 ){
if(b2.gcd(b1).intValue() !=1 ){
prln("Pair #"+i+": All you need is love!" );
}
else
prln("Pair #"+i+": Love is not all you need!" );
}
// int gcd=b1.gcd(b2).intValue();
/*
prln("gcd : "+gcd);
prln("compare : "+comp);
prln("b1 "+b1);
prln("b2 "+b2);
*/
}
}
public static void prln
(Object a
){ }
}