#include <bits/stdc++.h>
using namespace std;
int main() {
  int l1, l2;
  int n1, n2;
  char c;
  cin >> l1 >> l2;
  cin >> n1 >> c >> n2;
  if (n1 >= pow(10, l1 - 1) && n1 < pow(10, l1) && n2 >= pow(10, l2 - 1) &&
      n2 < pow(10, l2) && c == '-') {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
