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