#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re


def main():
    A, B = input().split()
    S = input()
    pattern = r'\d{{0}}-\d{{1}}'.format(A, B)
    print('Yes'if not re.search(pattern, S) is None else 'No')


if __name__ == "__main__":
    main()
