# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
# 文字列の入力
s = raw_input()
list = [ ]
list = s.split ( '-' )
if ( len(list[0]) == a and len(list[1]) == b):
    print "yes"
    exit()
print "no"
