#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, flag = 0;
  char *s;
  cin >> a >> b;
  c = a + b + 1;
  s = (char *)malloc(c * sizeof(int));
  for (int i = 0; i < c; i++) {
    cin >> s[i];
    if (i == (a + 1)) {
      if (s[i] != '-') {
        flag = 1;
        break;
      }
    } else {
      switch (s[i]) {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
        case 8:
        case 9:
        case 0:
          break;
        default:
          flag = 1;
      }
    }
  }
  if (flag == 1) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}
