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