using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

public class Hello
{

    public static void Main()
    {
        int[] n = Console.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
        string s_ = Console.ReadLine();
        if (!s_.Contains("-")) {
            Console.WriteLine("No");
            return;
        }
        string[] s = s_.Split('-');
        int m;

        if (int.TryParse(s[0], out m) && int.TryParse(s[1], out m))
        {
            Console.WriteLine("Yes");
            return;
        }
        Console.WriteLine("No");
        return;
    }

}

