using System;

namespace AtCoder1230_2
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int a = int.Parse(input[0]);
            int b = int.Parse(input[1]);

            var c = Console.ReadLine();
            bool isYubin = true;

            for (int i = 0; i < a; i++)
            {
                if (c[i] < '0' || '9' < c[i])
                {
                    isYubin = false;
                }
            }
            if(c[a] != '-'){
                isYubin = false;
            }

            for (int i = a + 1; i < b; i++)
            {
                if (c[i] < '0' || '9' < c[i])
                {
                    isYubin = false;
                }
            }

            if(isYubin == true){
                Console.WriteLine("Yes");
            }else{
                Console.WriteLine("No");
            }
        }
    }
}