#include <bits/stdc++.h>
using namespace std;
int INF = 1LL << 30;
int MOD = 1e9 + 7;
int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  for (int i = 0; i < S.length(); i++) {
    if (i == A) continue;
    if (S[i] == '-') break;
    if (i == S.length() - 1) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
