def abc084_b():
    import re
    a, b = map(int, input().split())
    s = input()
    
    return "Yes" if re.match("[0-9].*-[0-9].*", s) else "No"


if __name__ == '__main__':
    print(abc084_b())
