# -*- coding: utf-8 -*-
a,b = list(map(int,input().split()))
s = input()


if s.find("-") != -1:
    s = s.split("-")
    print(a,b,s[0],s[1])

    if a == len(s[0]) and b == len(s[1]):
        print("Yes")
    else:
        print("No")

else:
    print("No")
