#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n, m, c;
  cin >> n >> m;
  cin >> s;
  if (s[n] == '-' && s.size() == (n + m + 1)) {
    for (int j = n + 1; j < s.size(); j++) {
      if (isdigit(s[j]))
        c = 0;
      else {
        c = 1;
        break;
      }
    }
    if (c == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  } else
    cout << "No" << endl;
}
