#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  int n = S.find('-');
  if (n == A) {
    string strb = S.substr(n + 1);
    int m = strb.find('-');
    if (m == -1) {
      cout << "yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
