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