#include <bits/stdc++.h>
using namespace std;
int main() {
  int res = 0;
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') res++;
    if (res > 1 or s[A] != '-') {
      cout << "NO";
      system("pause");
      return 0;
    }
    cout << "YES";
    system("pause");
    return 0;
  }
}
