#include <bits/stdc++.h>
using namespace std;
char s[12];
int main() {
  int a, b;
  cin >> a >> b;
  cin >> s;
  for (int k = 0; k < a; ++k) {
    if (!(s[k] > '0' && s[k] <= '9')) {
      cout << "No" << endl;
      break;
    }
  }
  if (s[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int k = a + 1; k <= a + b; ++k) {
    if (!(s[k] > '0' && s[k] <= '9')) {
      cout << "No" << endl;
      break;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
