using System.Text.RegularExpressions;
using static System.Console;
using static System.Convert;

class Program
{
    static void Main(string[] args)
    {
        var input = ReadLine().Split(' ');
        var num1 = ToInt32(input[0]);
        var num2 = ToInt32(input[1]);
        var str = ReadLine();
        var rgx = new Regex(string.Format(@"\d{{0}}-\d{{1}}",num1,num2));
        WriteLine(rgx.IsMatch(str) ? "Yes" : "No");
    }
}
