#include <bits/stdc++.h>
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define sort(a) sort((a).begin(),(a).end())
#define rev(a) reverse((a).begin(),(a).end())
using db = double;
using namespace std;
typedef long long ll;


int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s.size() == a + b + 1 && s[a] == '-') cout << "Yes" << end;
  else cout << "No" << endl;
  
}
  