#include <bits/stdc++.h>
using namespace std;
int a, b;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin >> a >> b;
  cin >> s;
  if (s.length() != a + b + 1) {
    cout << "No" << '\n';
    return 0;
  }
  if (s[a] == '-') {
    cout << "Yes\n";
    return 0;
  } else {
    cout << "No" << '\n';
    return 0;
  }
  return 0;
}
