/*
ID: Aman Raj
LANG: C++
TASK: prefix
*/
//#include<iostream>
#include <stdio.h>
//#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#include<math.h>
typedef  long long int ll;
#include <bits/stdc++.h>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <utility>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//setbase - cout << setbase (16); cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 << endl; prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val

using namespace std;
using namespace __gnu_pbds;

#define f(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
//#define ll long long
#define pii pair< int,int >
#define pll pair< ll,ll >
#define sz(a) a.size()
#define inf (1000*1000*1000+5)
#define all(a) a.begin(),a.end()
#define tri pair<int,pii>
#define vii vector<pii>
#define vll vector<pll>
#define viii vector<tri>
#define mod (1000*1000*1000+7)
//#define mod 7
#define pqueue priority_queue< int >
#define pdqueue priority_queue< int,vi ,greater< int > >
//#define flush fflush(stdout)
#define primeDEN 727999983
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#include <fstream>
// find_by_order()  // order_of_key
typedef tree<
	int,
	null_type,
	less<int>,
	rb_tree_tag,
	tree_order_statistics_node_update>
	ordered_set;

	 ll n;vector<pair<ll,ll> > v;
   bool comp(pair<ll,ll> p1, pair<ll,ll> p2)
   {
    if(p1.first!=p2.first)return p1.first < p2.first;
     else return p1.second < p2.second;
   }
   ll aman(ll i)
   {  while(v[i+1].first==v[i].first){i++;if(i==n-1)return n-1;}
      return i;

   }
   vector<ll> dpfact;
   ll fact(ll a)
   { return dpfact[a];

   }
   ll mo=26;
   ll power1(ll a, ll b)//a raised to power b
   {  if(b<=0) return 1; if(b==1) return a;
       ll c=power1(a,b/2);
        c*=c;c%=mo;if(b%2==1) c*=a;c%=mo;
        return c;
   }
   ll mi(ll a,ll m)
   { ll c= power1(a,m-2);

     return c;
   }
   int main()
{    ofstream fout("tcase.txt");
     ll h,w;cin>>h>>w;
       vector<ll> v(26,0);
       for(ll i=0;i<h;i++)
       {
           for(ll j=0;j<w;j++)
           {
               char ch;cin>>ch;
                ll a=ch-'a';
                v[a]++;
           }
       }
       vector<ll> vans;
        for(auto x:v)if(x%4!=0)vans.push_back(x%4);
        if(vans.size()==0){cout<<"Yes";return 0;}
        if(h%2==0&&w%2==0)if(vans.size()!=0){cout<<"No";return 0;}
       if(h%2==0||w%2==0)
       {
           bool ok=true;
            for(auto x:vans)if(x!=2){ok=false;break;  }
            if(!ok)cout<<"No";
            else
            {
                if(h%2==0&&vans.size()>h/2)cout<<"No";
                else if(w%2==0&&vans.size()>w/2)cout<<"No";
                else cout<<"Yes";
            }

       }
       else
       {
           bool ok=true,ok2=true,ok3=false;
            for(auto x:vans){if(x!=2&&ok2){ok2=false;if(x==3)ok3=true;  }else if(x!=2&&!ok2){ok=false;break;  }}
            if(!ok)cout<<"No";
            else if(ok2)cout<<"No";
            else
            { //cout<<"hello"<<ok3<<vans.size()-1<<h/2+w/2<<endl;
              if(ok3==false&&vans.size()-1>(h/2 + w/2))cout<<"No";
              else if(ok3==true&&vans.size()>(h/2 + w/2))cout<<"No";
              else cout<<"Yes";
            }
       }

    return 0;
 }


Measured memory_bytes: 384