import std.stdio, std.algorithm, std.array, std.conv, std.typecons; void main() { auto tmp = readln.split.to!(uint[]); auto N = tmp[0], M = tmp[1]; bool[uint] Aset; foreach (i; 1 .. N+1) { uint mod = 1; foreach (m; 0 .. M) { mod = (i*mod) % N; } Aset[mod] = true; } writeln(Aset.length == N ? "Yes" : "No"); writeln(Aset.keys); }