# -coding: utf-8 -

a, b = map(int, input().split())
s = input()


isOUT = False
try:
    k = s[3]

    if k != "-":
        isOUT = True
except:
    isOUT = True
     
try:
    int(s[:3])
except:
    isOUT = True
    
try:
    int(s[3:])
except:
    isOUT = True

if isOUT:
    print("No")
else:
    print("Yes")
    
