#coding:utf-8
a,b = (int(i) for i in input().split())
s = input()
print(a,b,s[0:a],s[a],s[a+1:])

a = int(a)
b = int(b)

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