#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int A, B;
string s;
int main() {
  cin >> A >> B;
  cin >> s;
  if (s[A] != '-') {
    cout << "No" << endl;
    return 0;
  }
  s.erase(A);
  for (char& a : s) {
    if (a < '0' || '9' < a) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
