#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
  int a, b;
  string s;
  cin >> a >> b >> s;
  if(s[a] == '-'){
    sort(s.begin(), s.end());
    if(s[1] != '-'){
      cout << "Yes" << endl;
      return(0);
    }
  }
  cout << "No" << endl;
}