#include <bits/stdc++.h>
const unsigned long long int mod = 1e9 + 7;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < a + b + 1; ++i) {
    char n;
    cin >> n;
    if (i == a && n != '-') {
      cout << "No"
           << "\n";
      return 0;
    }
    if (i != a && n == '-') {
      return 0;
    }
  }
  cout << "Yes"
       << "\n";
}
