#include <bits/stdc++.h>
using namespace std;
const int INF = 100100100;
const long long LINF = 1e18 + 100;
const int MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ;
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  bool ok = true;
  for (int i = 0; i < (A); i++) {
    ok &= S[i] != '-';
  }
  ok &= S[A] == '-';
  for (int i = (A + 1); i < (B); i++) {
    ok &= S[i] != '-';
  }
  cout << (ok ? "Yes" : "No") << endl;
}
