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