#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string str;
  cin >> a >> b >> str;
  bool x = false;
  if (str.at(a) == '-') x = true;
  if (str.size() == a + b + 1) x = true;
  for (int i = 0; i < a; i++) {
    if (str.at(i) == '-') x = false;
  }
  for (int j = 0; j < b; j++) {
    if (str.at(a + j + 1) == '-') x = false;
  }
  if (x == true) cout << "Yes" << endl;
  if (x == false) cout << "No" << endl;
}
