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