#include <bits/stdc++.h>
using namespace std;

int main(void) {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int h = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') h++;
  }
  if (h == 1 && s[a] == '-') cout << "Yes\n";
  else cout << "No\n";
  
  return 0;
}