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