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