#include <bits/stdc++.h>
using namespace std;
void A();
int main() {
  int a, b;
  string s;
  cin >> a >> b;
  cin >> s;
  stringstream ss(s);
  getline(ss, s, '-');
  if (s.size() != a) cout << "No" << endl;
  getline(ss, s, '-');
  if (s.size() != b) cout << "No" << endl;
  if (getline(ss, s, '-')) cout << "No" << endl;
  cout << "Yes" << endl;
  return 0;
}
