#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] == '-') {
    if (s.find('-') == a) {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
  } else
    cout << "No" << endl;
  return 0;
}
