if __name__ == '__main__':
    
    A, B = [int(x) for x in input().split(' ')]
    S = input()

    S = S.split('-')
    if S.length < 2:
        print('No')

    a = S[0]
    b = S[1]

    if a.length == A:
        if b.length == B:
            print('YES')
            exit()

    print('No')
