#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 and s[A] == '-' and s.size() == A + B + 1) {
    cout << "YES";
    system("pause");
    return 0;
  }
  cout << "NO";
  system("pause");
  return 0;
}
