#include <bits/stdc++.h>
using namespace std;
struct enode {
  int y, nxt;
} e[1005 * 1005];
int n, m;
int tot = 0;
char s[1005][1005];
int q[1005 * 3];
int fa[1005 * 3], first[1005 * 3], dp[1005 * 3], goin[1005 * 3];
int get(int x) {
  if (fa[x] == x)
    return x;
  else
    return fa[x] = get(fa[x]);
}
void adde(int x, int y) {
  e[tot].nxt = first[x];
  e[tot].y = y;
  first[x] = tot++;
  goin[y]++;
}
int tupu() {
  int head = 1, tail = 0;
  for (int i = 1; i <= n + m; i++)
    if (goin[i] == 0) q[++tail] = i;
  while (head <= tail) {
    int x = q[head];
    for (int i = first[x]; i >= 0; i = e[i].nxt) {
      int y = e[i].y;
      goin[y]--;
      dp[y] = ((dp[y]) > (dp[x] + 1) ? (dp[y]) : (dp[x] + 1));
      if (goin[y] == 0) q[++tail] = y;
    }
    head++;
  }
  if (tail == n + m)
    return 1;
  else
    return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n + m; i++) fa[i] = i, first[i] = -1, dp[i] = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
    for (int j = 1; j <= m; j++) {
      int x = get(i), y = get(n + j);
      if (s[i][j] == '=') {
        if (x != y) fa[x] = y;
      }
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      int x = get(i), y = get(n + j);
      if (x == y && s[i][j] != '=') return printf("No"), 0;
      if (x == y) continue;
      if (s[i][j] == '>')
        adde(y, x);
      else
        adde(x, y);
    }
  if (tupu()) {
    printf("Yes\n");
    for (int i = 1; i <= n; i++) printf("%d ", dp[get(i)]);
    printf("\n");
    for (int i = 1; i <= m; i++) printf("%d ", dp[get(n + i)]);
    printf("\n");
  } else
    return printf("No"), 0;
  return 0;
}
