#include<bits/stdc++.h>

using namespace std;

using int64 = long long;

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


  cin >> A >> B;
  cin >> S;

  if(S.find('-') == A && count(begin(S), end(S), '-') == 1) {
    puts("Yes");
  } else {
    puts("No");
  }
}