#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string c;
  cin >> c;
  int key = 0;
  for (int i = 0; i < a; i++) {
    if (c.at(i) == '-') key = 1;
  }
  if (c.at(a) != '-') key = 1;
  for (int i = a + 1; i < b; i++) {
    if (c.at(i) == '-') key = 1;
  }
  if (key == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
