t=int(input()) for _ in range(t): v,x,fo,fi,q,r=map(int,input().split()) print(['Overflow','Safe','Zero'][(fo*q>=fi*r)+(fo*q>fi*r)])