#include <bits/stdc++.h>

int main(){
  int num1,num2;
  string str;
  std::cin >> num1 >> num2 >> str;
  for(int i = 0;i <num1 + num2;i++ ){
    if(i==num1){
      if(!(str[i]=='-')){std::cout << "No"<< '\n' ;return 0;}
    }
    else{
      if(!(str[i]>=0x30 && str[i]<=0x39)){std::cout << "No"<< '\n' ;return 0;}
    }
  }
  std::cout << "Yes" << '\n';
  return 0;
}