#include <bits/stdc++.h>
using namespace std;
const int IINF = 1e9;
const long long LINF = 1e18;
const long long mod = 1e9 + 7;
int main() {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  for (int i = 0; i < (int)(A); i++) {
    if (s[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  if (s[A] != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = (A + 1); i < (B); ++i) {
    if (s[i] == '-') {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
