using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace AtCoder
{
	class Program
	{
		static void Main(string[] args)
		{
			Question.Exec();
		}
	}

	public static class Question
	{
		public static bool IsOdd(long n)
		{
			bool isOdd = n % 2 == 1;
			return isOdd;
		}

		public static void Exec()
		{
			var array = Console.ReadLine().Split(' ').Select(i => int.Parse(i)).ToArray();
			int a = array[0];
			int b = array[1];
			string s = Console.ReadLine();

			if (s.Length != a + b + 1) {
				Console.WriteLine($"No");
				return;
			}

			if (s[a] != '-') {
				Console.WriteLine($"No");
				return;
			}

			string astr = s.Substring(0, a);
			string bstr = s.Substring(a, b);
			try {
				int.Parse(astr);
				int.Parse(bstr);
			} catch {
				Console.WriteLine($"No");
				return;
			}

			Console.WriteLine($"Yes");

			Console.ReadKey();
		}
	}
}