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