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