#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string c;
  for (int i = 1; i <= a + b + 1; i++) cin >> c[i];
  int flag = 0;
  for (int i = a + 2; i <= a + b + 1; i++) {
    if (c[i] < '0' || c[i] > '9') flag = 1;
  }
  if (flag == 0 && c[a + 1] == '-')
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
