#include <bits/stdc++.h>
using namespace std;
int N, A, B;
string s;
int main() {
  cin >> A >> B >> s;
  int p = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '-') p = i;
  }
  if (A == p && B == s.size() - A - 1)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
