#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long mod = 1e9 + 7;
int a, b;
string s;
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> a >> b >> s;
  for (int i = 0; i < a; i++) {
    if (s[i] < '0' && s[i] > '9') return cout << "No" << endl, 0;
  }
  for (int i = a + 1; i < s.size(); i++) {
    if (s[i] < '0' && s[i] > '9') return cout << "No" << endl, 0;
  }
  if (s[a] != '-') return cout << "No" << endl, 0;
  cout << "Yes";
}
