#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const long long INF = 1LL << 60;
int a, b;
string s;
int main() {
  cin >> a >> b >> s;
  int countA = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == '-') {
      countA = i;
      break;
    }
  }
  if (countA == a && (s.size() - countA - 1) == b)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
