#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  if (s.size() == A + B + 1 && s.at(A) == '-')
    puts("Yes");
  else
    puts("No");
}
