#include<iostream>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
using namespace std;


int main(){
	char str[11];
	int a,b;
	cin >> a >> b;
	int check = 1;
	for( int i = 0 ; i < a; i++ ){
		cin >> str[i];
		if ( isdigit(str[i]) ) else check = 0;
	}
	
	cin >> str[a];
	if ( str[a] == '-' ) else check = 0;
	
	for( int i = a + 1 ; i < a + b + 1 ; i++ ){
		cin >> str[i];
		if ( isdigit(str[i]) ) else check = 0;
	}
	
	if ( check ) cout << "Yes"; else cout << "No";
	return 0;
}
