#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
int main() {
  int a, b;
  string s;
  bool aflag = true;
  bool bflag = true;
  cin >> a >> b >> s;
  for (int i = 0; i < a; i++)
    if (s[i] == '-') aflag = false;
  for (int i = a + 1; i < b; i++)
    if (s[i] == '-') bflag = false;
  if (s[a] == '-' && s.size() == a + b + 1 && aflag && bflag)
    printf("Yes\n");
  else
    printf("No\n");
}
