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