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