#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string str;
  cin >> str;
  bool flag = true;
  if (str[a] != '-') flag = false;
  for (int i = 0; i < str.size(); i++) {
    if (a == i) continue;
    if (str[i] == '-') flag = false;
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
