#include <bits/stdc++.h>
int main(int argc, char** argv) {
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(0);
  std::cout << std::fixed << std::setprecision(6);
  int A, B, a, b;
  std::string S;
  std::cin >> A >> B >> S;
  char fmt[256], buf[256];
  sprintf(fmt, "%%0%dd-%%0%dd", A, B);
  std::cout << (sscanf(S.c_str(), fmt, &a, &b) == 2 ? "Yes" : "No")
            << std::endl;
  return 0;
}
