#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    return gcd(b, a);
  } else if (a % b) {
    return gcd(b, a % b);
  } else {
    return b;
  }
}
int main() {
  long long A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  long long a = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '1') {
      a++;
    }
  }
  if (a == 1 && S[A] == '-')
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
