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