#include <bits/stdc++.h>
using namespace std;
int a, b; string s;
int main()
{
    cin >>a>>b>>s;
    int cnt = 0;
    for(auto x:s) if(x=='-') ++cnt;
    if(s[a] == '-' && cnt==1) puts("Yes");
    else puts("No");
}