#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const array<pair<int, int>, 4> fd{make_pair(1, 0), make_pair(-1, 0),
                                  make_pair(0, 1), make_pair(0, -1)};
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  for (int i = (0); i < (a); i++) {
    if (s[i] <= '0' || s[i] >= '9') {
      cout << "No" << endl;
      return 0;
    }
  }
  if (s[a] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = (a + 1); i < (a + b + 1); i++) {
    if (s[i] <= '0' || s[i] >= '9') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
