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