#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, countt = 0;
  char s[15];
  cin >> a >> b;
  for (int i = 0; i < a + b + 1; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < a + b + 1; i++) {
    if (s[3] == '-') {
      if (s[i] >= '0' && s[i] <= '9') countt++;
    }
  }
  if (countt == a + b)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
