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