#!/usr/bin/python

# AtCoder Beginner Contest 084
# B: Postal Code

import sys

A, B = [int(w) for w in sys.stdin.readline().split()]
S = sys.stdin.readline().strip()

answer = True
answer = answer and (len(S) == A + B + 1)
answer = answer and (S[A] == '-')
answer = answer and all(c != '-' for c in S[:A] + S[A + 1:])

print("Yes" if answer else "No")
