using System; public class Hello { static void Main() { var T = int.Parse(Console.ReadLine().Trim()); while (T-- > 0) { string[] line = Console.ReadLine().Trim().Split(' '); var fo = long.Parse(line[2]); var fi = long.Parse(line[3]); var q = long.Parse(line[4]); var r = long.Parse(line[5]); getAns(fo, fi, q, r); } } static void getAns(long fo, long fi, long q, long r) { var fout = fo * q; var fin = fi * r; var ans = "Safe"; if (fout > fin) ans = "Zero"; else if (fout < fin) ans = "Overflow"; Console.WriteLine(ans); } }