#include <bits/stdc++.h>

using namespace std;

int main()
{
  int A, B; cin >> A >> B;
  string S; cin >> S;

  if (S.find('-') == A and count(S.begin(), S.end(), '-') == 1)  cout << "Yes";
  else cout << "No";
}