#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = (((1 << 30) - 1) << 1) + 1;
const int nINF = 1 << 31;
void bad() {
  cout << "No" << endl;
  exit(0);
}
const int N = 2010;
int parent[N];
int sz[N];
int find(int x) { return parent[x] = (x == parent[x] ? x : find(parent[x])); }
bool disjoint(int x, int y) { return find(x) != find(y); }
void join(int x, int y) {
  if (!disjoint(x, y)) return;
  int newPar = find(x), newChild = find(y);
  parent[newChild] = newPar;
}
int dsuSize(int x) { return sz[find(x)]; }
int n, m, s, ch[N][N], ans[N], onpath[N], vis[N];
vector<int> g[N];
void dfs(int s) {
  onpath[s] = vis[s] = 1;
  for (int v : g[s]) {
    if (onpath[v]) bad();
    if (!vis[v]) dfs(v);
  }
  int lo = 0;
  for (int v : g[s]) {
    lo = max(lo, ans[find(v)]);
  }
  ans[find(s)] = lo + 1;
  onpath[s] = 0;
}
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  s = n + m;
  std::iota(parent, parent + s + 1, 0), std::fill(sz, sz + s + 1, 1);
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) {
      char c;
      cin >> c;
      if (c == '=') {
        ch[i][j] = 0;
        join(i, n + j);
      }
      if (c == '>') ch[i][j] = 1;
      if (c == '<') ch[i][j] = -1;
    }
  }
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (m); j++) {
      if (ch[i][j] == 1) {
        g[find(i)].push_back(find(n + j));
      } else if (ch[i][j] == -1) {
        g[find(n + j)].push_back(find(i));
      }
    }
  }
  for (int i = 0; i < (n + m); i++)
    if (!vis[i]) dfs(find(i));
  cout << "Yes" << endl;
  for (int i = 0; i < (n); i++) cout << ans[find(i)] << ' ';
  cout << endl;
  for (int j = 0; j < (m); j++) cout << ans[find(n + j)] << ' ';
  cout << endl;
  return 0;
}
