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