#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int a, b;
  cin >> a >> b >> str;
  if (str[a] == '-' && str.size() - a - 1 == b)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
