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