#include <bits/stdc++.h>
using namespace std;
bool vis[2005], root[2005], dad[2005];
int n, m, h, id[2005];
vector<vector<int> > g(2005);
char a[1005][1005];
struct dsu {
  int p[2005], r[2005];
  dsu() {
    for (int i = 0; i <= n + m; i++) {
      p[i] = i;
      r[i] = 0;
    }
  }
  int find_(int node) {
    return p[node] == node ? node : p[node] = find_(p[node]);
  }
  void union_(int a, int b) {
    int pa = find_(a);
    int pb = find_(b);
    if (pa == pb) return;
    if (r[pa] > r[pb])
      p[pb] = pa;
    else if (r[pb] > r[pa])
      p[pa] = pb;
    else {
      p[pb] = pa;
      r[pa]++;
    }
  }
};
void topo(int node, int dep) {
  if (dad[node]) {
    cout << "No" << endl;
    exit(0);
  } else if (vis[node])
    return;
  vis[node] = 1;
  dad[node] = 1;
  for (int i = 0; i < g[node].size(); i++) {
    int child = g[node][i];
    topo(child, dep + 1);
  }
  h = max(h, dep);
  dad[node] = 0;
  return;
}
int dfs(int node) {
  if (vis[node]) return id[node];
  vis[node] = 1;
  for (int i = 0; i < g[node].size(); i++) {
    int child = g[node][i];
    id[node] = max(id[node], 1 + dfs(child));
  }
  id[node] = max(id[node], 1);
  return id[node];
}
int main() {
  cin >> n >> m;
  dsu u;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      cin >> a[i][j];
      if (a[i][j] == '=') u.union_(i, n + j);
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '=')
        continue;
      else {
        int pi = u.find_(i);
        int pj = u.find_(n + j);
        if (pi == pj) return cout << "No" << endl, 0;
        if (a[i][j] == '>') {
          g[pi].push_back(pj);
          root[pj] = 1;
        } else {
          g[pj].push_back(pi);
          root[pi] = 1;
        }
      }
    }
  for (int i = 1; i <= n + m; i++) {
    int pp = u.find_(i);
    if (!root[pp]) topo(pp, 1);
  }
  for (int i = 0; i <= m + n; i++) vis[i] = 0;
  for (int i = 1; i <= n + m; i++) {
    int pp = u.find_(i);
    if (!root[pp]) dfs(pp);
  }
  if (h == 0) return cout << "No" << endl, 0;
  cout << "Yes" << endl;
  for (int i = 1; i <= n; i++) {
    int pp = u.find_(i);
    cout << id[pp] << " ";
  }
  cout << endl;
  for (int i = 1; i <= m; i++) {
    int pp = u.find_(n + i);
    cout << id[pp] << " ";
  }
  cout << endl;
  return 0;
}
