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