#include <bits/stdc++.h>
using namespace std;
int head[2222], num[2222], in[2222], ans[2222];
char M[1111][1111];
struct node {
  int u, v, next;
} e[1111111];
int fa[2222];
int find(int u) { return u == fa[u] ? u : fa[u] = find(fa[u]); }
int tot, k;
int n, m;
void add(int u, int v) {
  e[tot].v = v;
  e[tot].next = head[u];
  head[u] = tot++;
}
int toposort() {
  queue<int> q;
  int num = 0;
  for (int i = 1; i <= n + m; i++)
    if (i == fa[i] && !in[i]) q.push(i), ans[i] = 1, num++;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = head[u]; i != -1; i = e[i].next) {
      int v = e[i].v;
      if (--in[v] == 0) {
        ans[v] = ans[u] + 1;
        q.push(v);
        num++;
      }
    }
  }
  return num;
}
int main() {
  while (cin >> n >> m) {
    tot = 0;
    for (int i = 1; i <= n + m; i++)
      head[i] = -1, fa[i] = i, in[i] = 0, ans[i] = 0;
    for (int i = 0; i < n; i++) {
      cin >> M[i];
      for (int j = 0; j < m; j++) {
        if (M[i][j] == '=') {
          int u = find(i + 1), v = find(j + 1 + n);
          if (u != v) fa[u] = v;
        }
      }
    }
    k = 0;
    for (int i = 1; i <= m + n; i++) {
      if (i == find(i)) num[i] = ++k;
    }
    int flag = 1;
    for (int i = 0; i < n; i++) {
      if (!flag) break;
      for (int j = 0; j < m; j++) {
        if (M[i][j] == '<') {
          int u = find(i + 1), v = find(j + 1 + n);
          if (u == v) {
            flag = 0;
            cout << "No" << '\n';
            break;
          }
          add(u, v);
          in[v]++;
        }
        if (M[i][j] == '>') {
          int u = find(i + 1), v = find(j + 1 + n);
          if (u == v) {
            flag = 0;
            cout << "No" << '\n';
            break;
          }
          add(v, u);
          in[u]++;
        }
      }
    }
    if (flag) {
      if (toposort() != k) {
        cout << "No" << endl;
        continue;
      }
      puts("Yes");
      for (int i = 1; i <= n + m; i++) {
        int fx = find(i);
        cout << ans[fx] << " ";
        if (i == n) cout << endl;
      }
      cout << endl;
    }
  }
  return 0;
}
