#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int ans[N], fa[N], n, m, head[N], cnt, col[N], tot, in[N], num;
char a[1005][1005];
int vis[N];
struct ii {
  int to, next;
} e[N];
inline void add(int u, int v) {
  e[++cnt].to = v;
  e[cnt].next = head[u];
  head[u] = cnt;
  in[v]++;
}
inline int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
inline void unionn(int x, int y) { fa[find(x)] = find(y); }
bool topsort() {
  queue<int> q;
  for (int i = 1; i <= tot; i++) {
    if (in[i] == 0) q.push(i);
    ans[i] = 1;
  }
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    num++;
    for (int i = head[x]; i; i = e[i].next) {
      int v = e[i].to;
      in[v]--;
      ans[v] = ans[x] + 1;
      if (in[v] == 0) q.push(v);
    }
  }
  if (num == tot) return 1;
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  char s[1005];
  for (int i = 1; i <= n; i++) {
    scanf("%s", s + 1);
    for (int j = 1; j <= m; j++) {
      a[i][j] = s[j];
    }
  }
  for (int i = 1; i <= n + m; i++) fa[i] = i;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '=') unionn(find(i), find(j + n));
    }
  }
  for (int i = 1, k; i <= n + m; i++) {
    if (vis[k = find(i)])
      col[i] = vis[k];
    else
      col[i] = vis[k] = ++tot;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '>')
        add(col[j + n], col[i]);
      else if (a[i][j] == '<')
        add(col[i], col[j + n]);
    }
  }
  if (topsort()) {
    printf("Yes\n");
    for (int i = 1; i <= n; i++) printf("%d ", ans[col[i]]);
    printf("\n");
    for (int i = n + 1; i <= n + m; i++) printf("%d ", ans[col[i]]);
  } else
    printf("No");
}
