#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  char s[100001];
  cin >> a >> b;
  for (int i = 1; i <= a + b + 1; i++) cin >> s[i];
  for (int i = 1; i <= a + b + 1; i++) {
    if (s[i] < 48 && s[i] > 58 && i != a + 1) {
      cout << "NO" << endl;
      return 0;
    }
    if (i == a + 1 && s[i] != '-') {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
