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