#include <bits/stdc++.h>
using namespace std;
const long long MAX_N = 2e3 + 6;
long long n, m;
bool Mark[MAX_N];
long long dp[MAX_N];
int num[MAX_N], cnt = 1;
string table[MAX_N];
vector<int> G[MAX_N];
vector<int> Grev[MAX_N];
vector<int> topo;
vector<int> comp[MAX_N];
vector<int> Gcomp[MAX_N];
void dfs(int v) {
  Mark[v] = true;
  for (int i = 0; i < G[v].size(); i++)
    if (!Mark[G[v][i]]) dfs(G[v][i]);
  topo.push_back(v);
}
void dfs_rev(int v, int c) {
  num[v] = c;
  for (int i = 0; i < Grev[v].size(); i++)
    if (!num[Grev[v][i]]) dfs_rev(Grev[v][i], c);
  comp[c].push_back(v);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> table[i];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (table[i][j] == '=' || table[i][j] == '<') {
        G[i].push_back(j + n);
        Grev[j + n].push_back(i);
      }
      if (table[i][j] == '=' || table[i][j] == '>') {
        G[j + n].push_back(i);
        Grev[i].push_back(j + n);
      }
    }
  for (int i = 0; i < n + m; i++)
    if (!Mark[i]) dfs(i);
  reverse(topo.begin(), topo.end());
  for (int i = 0; i < n + m; i++)
    if (!num[topo[i]]) {
      dfs_rev(topo[i], cnt);
      cnt++;
    }
  for (int i = 1; i < cnt; i++)
    for (int j = 0; j < comp[i].size(); j++)
      if (comp[i][j] < n)
        for (int h = 0; h < comp[i].size(); h++)
          if (n <= comp[i][h])
            if (table[comp[i][j]][comp[i][h] - n] != '=') {
              cout << "No\n";
              return 0;
            }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (num[i] != num[j + n]) {
        if (table[i][j] == '=' || table[i][j] == '>')
          Gcomp[num[i]].push_back(num[j + n]);
        if (table[i][j] == '=' || table[i][j] == '<')
          Gcomp[num[j + n]].push_back(num[i]);
      }
  for (int i = 0; i <= cnt; i++) {
    dp[i] = 1;
    for (int j = 0; j < Gcomp[i].size(); j++)
      dp[i] = max(dp[i], 1 + dp[Gcomp[i][j]]);
  }
  cout << "Yes\n";
  for (int i = 0; i < n; i++) cout << dp[num[i]] << " ";
  cout << "\n";
  for (int i = n; i < n + m; i++) cout << dp[num[i]] << " ";
  return 0;
}
