#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e6 + 10;
int head[maxn], in[maxn], dep[maxn], vis[maxn];
struct Edge {
  int f, t, next;
  Edge(int f = 0, int t = 0, int next = 0) : f(f), t(t), next(next) {}
} edge[maxn * 2];
string G[1005];
int cnt;
int fa[maxn], equ[maxn];
int findset(int e) { return fa[e] == e ? e : fa[e] = findset(fa[e]); }
bool check(int a, int b) { return findset(a) == findset(b); }
void un(int a, int b) { fa[findset(a)] = findset(b); }
void addedge(int f, int t) {
  edge[cnt] = Edge(f, t, head[f]);
  head[f] = cnt++;
}
int cnt2[maxn];
int ok = 1;
int n, m;
vector<int> topo;
void bfs() {
  queue<int> q;
  for (int i = 1; i <= n + m; i++)
    if (!in[i]) {
      vis[i] = dep[i] = 1;
      q.push(i);
    }
  while (!q.empty()) {
    int u = q.front();
    topo.push_back(u);
    q.pop();
    for (int i = head[u]; ~i; i = edge[i].next) {
      int v = edge[i].t;
      if (--in[v] == 0) {
        dep[v] = dep[u] + 1;
        q.push(v);
      }
    }
  }
}
bool check() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (G[i][j - 1] == '=' and dep[i] != dep[j + n]) return 0;
      if (G[i][j - 1] == '>' and dep[i] <= dep[j + n]) return 0;
      if (G[i][j - 1] == '<' and dep[i] >= dep[j + n]) return 0;
    }
  }
  return 1;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n + m; i++) {
    head[i] = -1;
    dep[i] = 1;
    fa[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> G[i];
    for (int j = 1; j <= m; j++) {
      int f = i, t = j + n;
      if (G[i][j - 1] == '=') un(f, t);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int f = findset(i), t = findset(j + n);
      if (G[i][j - 1] == '>') {
        in[f]++;
        addedge(t, f);
      } else if (G[i][j - 1] == '<') {
        in[t]++;
        addedge(f, t);
      }
    }
  }
  int ecnt = 0;
  for (int i = 1; i <= n + m; i++)
    if (fa[i] == i) ecnt++;
  bfs();
  int qwq = 1;
  for (int i = 1; i <= n + m; i++) {
    dep[i] = dep[findset(i)];
  }
  if (check())
    cout << "Yes\n";
  else {
    cout << "No\n";
    return 0;
  }
  for (int i = 1; i <= n; i++) cout << dep[i] << " ";
  cout << endl;
  for (int i = 1; i <= m; i++) cout << dep[n + i] << " ";
  return 0;
}
