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


def main():
    A, B = map(int, input().split())
    S = input().split('-')
    print('Yes'if all([s.isdigit() for s in S])and len(S) == 2 else 'No')


if __name__ == "__main__":
    main()
