using System; class Program { public void Solve() { string N = Console.ReadLine(); // 100円玉 string M = Console.ReadLine(); // 10円玉 // M = 10 * N を満たす Console.WriteLine("Yes"); } static void Main() { var solver = new Program(); solver.Solve(); } }