import std; void main(){ auto n = readln.chomp.to!int; auto a = readln.chomp.split.to!(int[]); auto b = a.filter!(x => x != 0).array.sort; auto min = b[1] - b[0]; for(auto i = 1; i < b.length - 1; i++){ auto d = b[i + 1] - b[i]; min = min.gcd(d); } stderr.writeln(min); if(b[$ - 1] - b[0] <= min * (n - 1)){ writeln("Yes"); }else{ writeln("No"); } }