#define __GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <climits>
#include <queue>
#include <bitset>
#include <complex>
#include <stack>
#include <unordered_set>

using namespace std;

//#define int long long
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define len(v) (int)v.size()
#define pii pair<int, int>
#define x first
#define y second

typedef long double ld;
typedef long long ll;

signed main() {
    
    iostream::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    int n, m;
    cin >> n >> m;
    vector<vector<char>> mat(n, vector<char>(m, '.'));
    vector<int> cnt(26);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            char c;
            cin >> c;
            cnt[c - 'a']++;
        }
    }
    
    int nn = n / 2;
    int nm = m / 2;
    int cpos = 0;
    while (n >= 2 && m >= 2) {
        bool found = false;
        for (char c = 0; c < 26; c++) {
            if (cnt[c] >= 4) {
                cnt[c] -= 4;
                mat[cpos / nm][cpos % nm] = c + 'a';
                mat[cpos / nm][m - cpos % nm - 1] = c + 'a';
                mat[n - cpos / nm - 1][cpos % nm] = c + 'a';
                mat[n - cpos / nm - 1][m - cpos % nm - 1] = c + 'a';
                cpos++;
                if (cpos == nn * nm) {
                    found = false;
                    break;
                }
                found = true;
            }
        }
        if (!found)
            break;
    }
    
//        for (int i = 0; i < n; i++) {
//            for (int j = 0; j < m; j++) {
//                cout << mat[i][j];
//            }
//            cout << endl;
//        }
//        cout << endl;
    
    if (n % 2 && m > 1) {
        cpos = 0;
        while (true) {
            bool found = false;
            for (char c = 0; c < 26; c++) {
                if (cnt[c] >= 2) {
                    cnt[c] -= 2;
                    mat[n / 2][cpos] = c + 'a';
                    mat[n / 2][m - cpos - 1] = c + 'a';
                    cpos++;
                    if (cpos >= m / 2)
                        break;
                    found = true;
                }
            }
            if (!found || cpos >= m / 2)
                break;
        }
    }
    
//        for (int i = 0; i < n; i++) {
//            for (int j = 0; j < m; j++) {
//                cout << mat[i][j];
//            }
//            cout << endl;
//        }
//        cout << endl;
    
    if (m % 2 && n > 1) {
        cpos = 0;
        while (true) {
            bool found = false;
            for (char c = 0; c < 26; c++) {
                if (cnt[c] >= 2) {
                    cnt[c] -= 2;
                    mat[cpos][m / 2] = c + 'a';
                    mat[n - cpos - 1][m / 2] = c + 'a';
                    cpos++;
                    if (cpos >= n / 2)
                        break;
                    found = true;
                }
            }
            if (!found || cpos >= n / 2)
                break;
        }
    }
    
//        for (int i = 0; i < n; i++) {
//            for (int j = 0; j < m; j++) {
//                cout << mat[i][j];
//            }
//            cout << endl;
//        }
//        cout << endl;
    
    if (n % 2 && m % 2) {
        for (char c = 0; c < 26; c++)
            if (cnt[c]) {
                mat[n / 2][m / 2] = c + 'a';
                cnt[c]--;
                break;
            }
    }
    
//        for (int i = 0; i < n; i++) {
//            for (int j = 0; j < m; j++) {
//                cout << mat[i][j];
//            }
//            cout << endl;
//        }
    
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (mat[i][j] == '.') {
                cout << "No";
                exit(0);
            }
        }
    }
    
    cout << "Yes" << endl;
    
    return 0;
}

Measured memory_bytes: 256