#include <bits/stdc++.h>
using db = double;
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s[a] == '-') {
    int sum = 0;
    for (int i = (int)(0); i < (int)(s.size()); i++) {
      if (s[i] = '-') sum++;
    }
    if (sum == 1) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
