#include <bits/stdc++.h>
using namespace std;
int main() {
  size_t A, B, fpos, rpos;
  string S;
  cin >> A >> B;
  cin >> S;
  fpos = S.find('-');
  rpos = S.rfind('-');
  if (fpos != rpos || fpos == -1)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
