using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp1
{
    public static class MyExtensions
    {
        public static string Slice(this string str, int start = 0, int stop = 0)
        {
            if (start > str.Length || stop > str.Length || start < 0 || stop < 0)
                return "";

            if (stop == 0) stop = str.Length;
            return str.Substring(start, stop - start);
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            ABC084_B();
        }

        static void ABC084_B()
        {
            var AB = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var S = Console.ReadLine().Select(x => x.ToString()).ToArray();
            
            if (S[AB[0]] == "-")
            {
                S[AB[0]] = "";
                var str = string.Join("", S);
                if (IsDigit(str) && str.Length == AB[0] + AB[1])
                {
                    Console.WriteLine("Yes");
                    return;
                }
            }
            Console.WriteLine("No");
        }

        public static IEnumerable<int> Range(int start, int stop)
        {
            if (start < 0 || stop < 0)
                throw new Exception("0??");

            if (start > stop || (start == 0 && stop == 0))
                return new List<int>();

            return Enumerable.Range(start, stop - start);
        }

        public static bool IsDigit(string str)
        {
            var i = 0;
            return int.TryParse(str, out i);
        }
    }
}