#include <bits/stdc++.h>
using namespace std;

int main() {
  // ここにプログラムを追記
  int a, b;
  string c;
  cin >> a >> b;
  cin >> c;
  if (c.size() != a + b + 1) {
    cout << "No" << end;
    return 0;
  }
  for (int i=0;i<c.size();i++) {
    if (i==a) {
      if (a[i] != '-') {
	    cout << "No" << end;
    	return 0;
      }
    } else {
      if (a[i] <'0' || a[i] > '9') {
	    cout << "No" << end;
    	return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
