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