using System;


class Program
{
    static void Main(string[] args)
    {
        String[] tmp = Console.ReadLine().Split(' ');
        
        

        try
        {
            int A = int.Parse(tmp[0]);
            int B = int.Parse(tmp[1]);
            String[] S = Console.ReadLine().Split('-');
            String S_a = S[0];
            String S_b = S[1];
            int check = int.Parse(S_a);
            check = int.Parse(S_b);
            Console.WriteLine("Yes");
            
        }catch(Exception e)
        {
            Console.WriteLine("No");
        }
        //System.Threading.Thread.Sleep(5000);
    }
}
