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