#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s[a] != '-')
    cout << "No" << endl;
  else {
    bool y = true;
    for (int i = 0; i < a; i++)
      if (s[i] == '-') y = false;
    for (int i = a + 1; i < b; i++)
      if (s[i] == '-') y = false;
    cout << (y ? "Yse" : "No") << endl;
  }
  return 0;
}
