#include<bits/stdc++.h>

using namespace std;

int main()
{
   int a, b, flag = 0;
   string s;
   cin >> a >> b >> s;

   for(int i = 0; i < a + b + 1; i++)
   {
     if(s[i] == '-')
     {
        continue;
     }
     else
        flag++;
   }

   if(flag == a + b)
    cout << "YES" << endl;
   else
    cout << "NO" << endl;



    return 0;