output_description: If Snuke can create a matrix satisfying the condition, print `Yes`; otherwise,
  print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      H W
      a_{11}a_{12}...a_{1W}
      :
      a_{H1}a_{H2}...a_{HW}
attempt: H, W = map(int, input().split())
  
  A = []
  if W == 1:
      for h in range(H):
          A.append(input())
  else:
      for h in range(H):
          for w in list(input()):
              A.append(w)
  
  from collections import Counter
  
  data = Counter(A)
  
  ok = True
  if W % 2 == 1 and H % 2 == 1:
      flag_4 = False
      get_quad = 0
      for i in data:
          # can get 4
          while data[i] // 4 >= 1 and flag_4 == False:
              # want 4
              if get_quad < (W - 1) * (H - 1) / 4:
                  data[i] -= 4
                  get_quad += 1
              if get_quad == (W - 1) * (H - 1) / 4:
                  flag_4 = True
      if flag_4 == False:
          print("No")
          ok = False
  
      get_double = 0
      flag_2 = False
      for i in data:
          # can get 2
          while data[i] // 2 >= 1 and flag_2 == False:
              # want 4
              if get_quad < (W + H - 2) / 2:
                  data[i] -= 2
                  get_double += 1
              if get_quad == (W + H - 2) / 2:
                  flag_2 = True
  
      if flag_2 == False:
          print("No")
          ok = False
  
  elif W % 2 == 1 and H % 2 == 0:
      flag_4 = False
      get_quad = 0
      for i in data:
          # can get 4
          while data[i] // 4 >= 1 and flag_4 == False:
              # want 4
              if get_quad < (W - 1) * (H) / 4:
                  data[i] -= 4
                  get_quad += 1
              if get_quad == (W - 1) * (H) / 4:
                  flag_4 = True
      if flag_4 == False:
          print("No")
          ok = False
  
      get_double = 0
      flag_2 = False
      for i in data:
          # can get 2
          while data[i] // 2 >= 1 and flag_2 == False:
              # want 4
              if get_quad < (H) / 2:
                  data[i] -= 2
                  get_double += 1
              if get_quad == (H) / 2:
                  flag_2 = True
  
      if flag_2 == False:
          print("No")
          ok = False
  elif W % 2 == 0 and H % 2 == 1:
      flag_4 = False
      get_quad = 0
      for i in data:
          # can get 4
          while data[i] // 4 >= 1 and flag_4 == False:
              # want 4
              if get_quad < (H - 1) * (W) / 4:
                  data[i] -= 4
                  get_quad += 1
              if get_quad == (H - 1) * (W) / 4:
                  flag_4 = True
      if flag_4 == False:
          print("No")
          ok = False
  
      get_double = 0
      flag_2 = False
      for i in data:
          # can get 2
          while data[i] // 2 >= 1 and flag_2 == False:
              # want 4
              if get_quad < (W) / 2:
                  data[i] -= 2
                  get_double += 1
              if get_quad == (W) / 2:
                  flag_2 = True
  
      if flag_2 == False:
          print("No")
          ok = False
  
  elif W % 2 == 0 and H % 2 == 0:
      flag_4 = False
      get_quad = 0
      for i in data:
          # can get 4
          while data[i] // 4 >= 1 and flag_4 == False:
              # want 4
              if get_quad < (H) * (W) / 4:
                  data[i] -= 4
                  get_quad += 1
              if get_quad == (H - 1) * (W) / 4:
                  flag_4 = True
      if flag_4 == False:
          print("No")
          ok = False
  
      get_double = 0
      flag_2 = False
      for i in data:
          # can get 2
          while data[i] // 2 >= 1 and flag_2 == False:
              # want 4
              if get_quad < (W) / 2:
                  data[i] -= 2
                  get_double += 1
              if get_quad == (W) / 2:
                  flag_2 = True
  
      if flag_2 == False:
          print("No")
          ok = False
  if ok:
      print("Yes")
  
problem_description: Statement
  
  We have an H-by-W matrix. Let a_{ij} be the element at the i-th row from the
  top and j-th column from the left. In this matrix, each a_{ij} is a lowercase
  English letter.
  
  Snuke is creating another H-by-W matrix, A', by freely rearranging the
  elements in A. Here, he wants to satisfy the following condition:
  
    * Every row and column in A' can be read as a palindrome.
  
  Determine whether he can create a matrix satisfying the condition.
samples: [{"input": "3 4\n    aabb\n    aabb\n    aacc", "output": "Yes\n    \n\nFor example, the following matrix satisfies the condition.\n\n    \n    \n    abba\n    acca\n    abba\n    \n\n* * *"}, {"input": "2 2\n    aa\n    bb", "output": "No\n    \n\nIt is not possible to create a matrix satisfying the condition, no matter how\nwe rearrange the elements in A.\n\n* * *"}, {"input": "5 1\n    t\n    w\n    e\n    e\n    t", "output": "Yes\n    \n\nFor example, the following matrix satisfies the condition.\n\n    \n    \n    t\n    e\n    w\n    e\n    t\n    \n\n* * *"}, {"input": "2 5\n    abxba\n    abyba", "output": "No\n    \n\n* * *"}, {"input": "1 1\n    z", "output": "Yes"}]