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