using System.Linq;
using System;

public class Hello
{
    public static void Main()
    {
        var number = "0123456789";
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = int.Parse(line[0]);
        var b = int.Parse(line[1]);
        var s = Console.ReadLine().Trim();
        if (s.Length != a + b + 1) { Console.WriteLine("NO"); goto end; }
        if (s[a] != '-') { Console.WriteLine("NO"); goto end; }
        for (int i = 0; i < a; i++)
            if (!number.Contains(s[i])) { Console.WriteLine("NO"); goto end; }
        for (int i = a + 1; i < b + 1; i++)
            if (!number.Contains(s[i])) { Console.WriteLine("NO"); goto end; }
        Console.WriteLine("YES");
        end:;
    }
}