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