using System; using System.Linq; namespace Sample { class Program { static void Main(string[] args) { var list = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var (X, A, Y, B) = (list[0], list[1], list[2], list[3]); var ans = (long)Math.Pow(X, A) % Y == 0 ? "Yes" : "No"; Console.WriteLine(ans); } } }