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