#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  string res = "Yes";
  if (s[a] != '-') {
    res = "No";
  }
  if (s.length() != a + b + 1) {
    res = "No";
  }
  cout << res;
}
