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