#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b;
  cin >> s;
  bool flag = true;
  for (int i = 0; i != a, i < a + b + 1; i++) {
    if (s[i] == '-') flag = false;
  }
  if (s[a] != '-') flag = false;
  if (flag == true)
    puts("Yes");
  else
    puts("No");
}
