#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  char s[a + b + 1];
  for (int i = 0; i < a + b + 1; i++) {
    cin >> s[i];
  }
  bool flag = false;
  if (s[a] == '-') {
    flag = true;
  }
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') {
      flag = false;
    }
  }
  for (int i = a + 1; i < b; i++) {
    if (s[i] == '-') {
      flag = false;
    }
  }
  cout << (flag ? "Yes" : "No") << endl;
  return 0;
}
