unittest
{
	assert( [ "3 4", "269-6650" ].parse.expand.solve == "Yes" );
	assert( [ "1 1", "---" ].parse.expand.solve == "No" );
	assert( [ "1 2", "7444" ].parse.expand.solve == "No" );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto ab = input.front.split.to!( long[] );
	input.popFront;
	auto s = input.front.strip;
	return tuple( ab[ 0 ], ab[ 1 ], s );
}

auto solve( long a, long b, string s )
{
	if( s.length != a + 1 + b ) return "No";
	
	foreach( i, c; s )
	{
		if( i == a )
		{
			if( c != '-' ) return "No";
		}
		else
		{
			if( c < '0' || '9' < c ) return "No";
		}
	}
	
	return "Yes";
}
