#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "iomanip"
#include "random"

using namespace std;

const long long int MOD = 1000000007;
const long double EPS = 0.00000001;
const long double PI = 3.1415926535897932384626433;

long long int N, M, K, H, W, L, R;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N >> M;
	int num[26] = {};
	for (int i = 0; i < N; i++) {
		string s;
		cin >> s;
		for (auto j : s) {
			num[j - 'a']++;
		}
	}
	vector<vector<char>>ans(N, vector<char>(M, '0'));
	list<char>four;
	list<char>two;
	list<char>one;
	for (int i = 0; i < 26; i++) {
		while (num[i] >= 4) {
			four.push_back(char(i + 'a'));
			num[i]-=4;
		}
		while (num[i] >= 2) {
			two.push_back(char(i + 'a'));
			num[i] -= 2;
		}
		while (num[i]) {
			one.push_back(char(i + 'a'));
			num[i]--;
		}
	}
	if (N % 2 && M % 2) {
		if (one.size() != 1) {
			cout << "No\n";
			return 0;
		}
		if (four.size() < (N / 2)*(M / 2)) {
			cout << "No\n";
			return 0;
		}
		if ((N / 2 + M / 2 - two.size()) % 2) {
			cout << "No\n";
			return 0;
		}
		ans[N / 2][M / 2] = one.front();
		for (int i = 0; i < N / 2; i++) {
			if (two.empty()) {
				char box = four.back();
				four.pop_back();
				two.push_back(box);
				two.push_back(box);
			}
			char box = two.front();
			two.pop_front();
			ans[i][M / 2] = box;
			ans[N - i - 1][M / 2] = box;
		}
		for (int i = 0; i < M / 2; i++) {
			if (two.empty()) {
				char box = four.back();
				four.pop_back();
				two.push_back(box);
				two.push_back(box);
			}
			char box = two.front();
			two.pop_front();
			ans[N / 2][i] = box;
			ans[N / 2][M - i - 1] = box;
		}
		for (int i = 0; i < N / 2; i++) {
			for (int j = 0; j < M / 2; j++) {
				char box = four.front();
				four.pop_front();
				ans[i][j] = box;
				ans[i][M - j - 1] = box;
				ans[N - i - 1][j] = box;
				ans[N - i - 1][M - j - 1] = box;
			}
		}
	}
	else if (N % 2 == 0 && M % 2) {
		if (four.size() < (N / 2)*(M / 2)) {
			cout << "No\n";
			return 0;
		}
		if ((N / 2 - two.size()) % 2) {
			cout << "No\n";
			return 0;
		}
		for (int i = 0; i < N / 2; i++) {
			if (two.empty()) {
				char box = four.back();
				four.pop_back();
				two.push_back(box);
				two.push_back(box);
			}
			char box = two.front();
			two.pop_front();
			ans[i][M / 2] = box;
			ans[N - i - 1][M / 2] = box;
		}
		for (int i = 0; i < N / 2; i++) {
			for (int j = 0; j < M / 2; j++) {
				char box = four.front();
				four.pop_front();
				ans[i][j] = box;
				ans[i][M - j - 1] = box;
				ans[N - i - 1][j] = box;
				ans[N - i - 1][M - j - 1] = box;
			}
		}
	}
	else if (N % 2 && M % 2 == 0) {
		if (four.size() < (N / 2)*(M / 2)) {
			cout << "No\n";
			return 0;
		}
		if ((M / 2 - two.size()) % 2) {
			cout << "No\n";
			return 0;
		}
		for (int i = 0; i < M / 2; i++) {
			if (two.empty()) {
				char box = four.back();
				four.pop_back();
				two.push_back(box);
				two.push_back(box);
			}
			char box = two.front();
			two.pop_front();
			ans[N / 2][i] = box;
			ans[N / 2][M - i - 1] = box;
		}
		for (int i = 0; i < N / 2; i++) {
			for (int j = 0; j < M / 2; j++) {
				char box = four.front();
				four.pop_front();
				ans[i][j] = box;
				ans[i][M - j - 1] = box;
				ans[N - i - 1][j] = box;
				ans[N - i - 1][M - j - 1] = box;
			}
		}
	}
	else {
		if (four.size() < (N / 2)*(M / 2)) {
			cout << "No\n";
			return 0;
		}
		for (int i = 0; i < N / 2; i++) {
			for (int j = 0; j < M / 2; j++) {
				char box = four.front();
				four.pop_front();
				ans[i][j] = box;
				ans[i][M - j - 1] = box;
				ans[N - i - 1][j] = box;
				ans[N - i - 1][M - j - 1] = box;
			}
		}
	}
	cout << "Yes\n";
	return 0;
}


Measured memory_bytes: 384