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