#include <bits/stdc++.h>
using namespace std;
const int inf = 100100100;
const long long INF = 1LL << 60;
const int MOD = (int)1e9 + 7;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int ans = 0;
  while (s[ans] != '-' && ans < s.size()) {
    ans++;
  }
  if (ans == a && s.size() - 1 - a == b)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
