public static void Main()
Console.WriteLine(comp(new int[]{121,144,19,161,19,144,19,11}, new int[]{121,14641,20736,361,25921,361,20736,361}) == true ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{2,2,3}, new int[]{4,9,9}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{2,2,3}, new int[]{4,4,9}) == true ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{121,144,19,161,19,144,19,11}, new int[]{121,14641,20736,36100,25921,361,20736,361}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{4,4}, new int[]{1,31}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{4,3}, new int[]{0,25}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{}, new int[]{1}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{}, null) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{}, new int[]{}) == true ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{121,144,19,161,19,144,19,11,1008}, new int[]{121,14641,20736,36100,25921,361,20736,361}) == false ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{121,1440,191,161,19,144,195,11}, new int[]{121,14641,2073600,36481,25921,361,20736,38025}) == true ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{0,14,191,161,19,144,195,1}, new int[]{1,0,196,36481,25921,361,20736,38025}) == true ? "Working" : "Not working");
Console.WriteLine(comp(new int[]{0,14,191,161,19,144,195,1,2}, new int[]{1,0,196,36481,25921,361,20736,38025,3}) == false ? "Working" : "Not working");
public static bool comp(int[] a, int[] b)
if(a == null && b == null) return true;
if(a == null || b == null) return false;
if(a.Length == 0 && b.Length == 0) return true;
if(a.Length == 0 || b.Length == 0) return false;
for(var i = 0; i < a.Length; i++)
if(a[i]*a[i] != b[i]) return false;