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