#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  string t;
  cin >> a >> b;
  cin >> t;
  for (long long i = 0; i < a; i++) {
    if (t[i] == '-') {
      cout << ("No") << endl;
      return 0;
    }
  }
  if (t[a] != '-') {
    cout << ("No") << endl;
    return 0;
  }
  for (long long i = a + 1; i < b; i++) {
    if (t[i] == '-') {
      cout << ("No") << endl;
      return 0;
    }
  }
  cout << ("Yes") << endl;
}
