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; if(b.length < 2){ writeln("Yes"); return; } auto m = b[1] - b[0]; for(auto i = 1; i < b.length - 1; i++){ auto d = b[i + 1] - b[i]; m = m.gcd(d); } stderr.writeln(m); if(b[$ - 1] - b[0] <= m * (n - 1)){ writeln("Yes"); }else{ writeln("No"); } }