#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp>

#include <ext/rope> //header with rope
using namespace std;
using namespace __gnu_cxx; //namespace with rope and some additional stuff
using namespace __gnu_pbds;

#define rep(i, a, b) for(int i=a; i<b; i++)
#define pb push_back
#define mp make_pair
#define F first
#define S second

typedef long long int ll;
typedef unsigned long long int ull;
typedef pair <int, int> ii;

const ll mod = 1000000007;
const int INF = 0x3f3f3f3f;




int main(){
		
	int a, b; cin >> a >> b; 
	string s; getline(cin, s);
	getline(cin, s);
	
	if(s.size()==a+b+1 && s[a]=='-'){
		rep(i, 0, s.size()){
			if(i==a) continue;
			if(!isdigit(s[i])){
				puts("No");
				return 0;
			}
		}
	}
	
	puts("Yes");

	
	return 0;
	
}