unittest
{
	assert( [ "3 4", "aabb", "aabb", "aacc" ].parse.expand.solve == "Yes" );
	assert( [ "2 2", "aa", "bb" ].parse.expand.solve == "No" );
	assert( [ "5 1", "t", "w", "e", "e", "t" ].parse.expand.solve == "Yes" );
	assert( [ "2 5", "abxba", "abyba" ].parse.expand.solve == "No" );
	assert( [ "1 1", "z" ].parse.expand.solve == "Yes" );
}



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

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto hw = input.front.split.to!( long[] );
	auto ass = new dchar[][]( hw[ 0 ], hw[ 1 ] );
	foreach( ref as; ass )
	{
		input.popFront;
		as = input.front.to!( dchar[] );
	}
	return tuple( hw[ 0 ], hw[ 1 ], ass );
}

auto solve( long h, long w, dchar[][] ass )
{
	// 同じ文字の必要数を計算
	auto ns = [ 4:0L, 2:0L, 1:0L ];
	ns[ 4 ] += ( h / 2 ) * ( w / 2 );
	if( h % 2 == 1 ) ns[ 2 ] += ( h % 2 ) * ( w / 2 );
	if( w % 2 == 1 ) ns[ 2 ] += ( h / 2 ) * ( w % 2 );
	if( h % 2 == 1 && w % 2 == 1 ) ns[ 1 ] += 1;
	
	// 文字ごとに4,2,1単位で集計
	auto cs = [ 4:0L, 2:0L, 1:0L ];
	foreach( g; ass.join.sort().group )
	{
		auto c = g[ 1 ];
		for( auto k = 4; 0 < k; k /= 2 )
		{
			cs[ k ] += c / k;
			c %= k;
		}
	}
	
	// 必要数と一致するか判定
	for( auto k = 4; 0 < k; k /= 2 )
	{
		if( cs[ k ] < ns[ k ] ) return "No";
		cs[ k / 2 ] += ( cs[ k ] - ns[ k ] ) * 2;		// 余った分は小さい単位に分解して繰り越し
	}
	return "Yes";
}
