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