#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  string ans = "Yes";
  for (int i = 0; i < S.size(); i++) {
    if (i != 3 && S[i] == '-') {
      ans = "No";
      break;
    } else if (i == 3 && S[i] != '-') {
      ans = "No";
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
