#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, flag = 0, i;
  char *s;
  cin >> a >> b;
  s = new char[a + b + 1];
  for (i = 1; i <= a + b + 1; i++) {
    cin >> s[i];
  }
  if (s[a + 1] != '-') {
    cout << "No\n";
  } else {
    for (i = a + 1; i <= a + b; i++) {
      s[i] = s[i + 1];
    }
    for (i = 1; i <= a + b; i++) {
      if ((s[i] == '1') || (s[i] == '2') || (s[i] == '3') || (s[i] == '4') ||
          (s[i] == '5') || (s[i] == '6') || (s[i] == '7') || (s[i] == '8') ||
          (s[i] == '9') || (s[i] == '0')) {
        flag = 0;
      } else {
        flag = 1;
      }
    }
  }
  if (flag == 0) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  return 0;
}
