#include <bits/stdc++.h>
using namespace std;
bool check_int(string S) {
  try {
    int n = stoi(S);
  } catch (...) {
    return false;
  }
  return true;
}
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  bool flag = true;
  string c = S;
  S.erase(S.begin() + A);
  flag = check_int(S);
  if (c[A] != '-') flag = false;
  if (c.size() != A + B + 1) flag = false;
  cout << ((flag) ? "Yes" : "No");
}
