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