#include <bits/stdc++.h>
int n, m, fa[2005];
char s[2005][2005], G[2005][2005];
int in[2005], dis[2005];
int find(int x) { return fa[x] ? fa[x] = find(fa[x]) : x; }
inline void join(int a, int b) {
  int x = find(a), y = find(b);
  if (x != y) fa[x] = y;
}
bool bfs() {
  std::queue<int> q;
  int i, u, cnt = 0;
  for (i = 1; i <= n + m; ++i) {
    if (!fa[i]) {
      ++cnt;
      if (!in[i]) {
        dis[i] = 1;
        q.push(i);
      }
    }
  }
  while (!q.empty()) {
    u = q.front();
    q.pop();
    --cnt;
    for (i = 1; i <= n + m; ++i) {
      if (G[u][i]) {
        if (!--in[i]) {
          dis[i] = dis[u] + 1;
          in[i] = 1 << 30;
          q.push(i);
        }
      }
    }
  }
  return !cnt;
}
int main() {
  int i, j, a, b;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; ++i) {
    scanf("%s", s[i] + 1);
    for (j = 1; j <= m; ++j) {
      if (s[i][j] == '=') join(i, n + j);
    }
  }
  for (i = 1; i <= n; ++i) {
    for (j = 1; j <= m; ++j) {
      if (s[i][j] != '=') {
        a = find(i);
        b = find(n + j);
        if (a == b) {
          puts("No");
          return 0;
        }
        if (s[i][j] == '<') {
          if (!G[a][b]) {
            G[a][b] = 1;
            ++in[b];
          }
        } else {
          if (!G[b][a]) {
            G[b][a] = 1;
            ++in[a];
          }
        }
      }
    }
  }
  if (bfs()) {
    puts("Yes");
    for (int i = 1; i <= n; ++i) printf("%d ", dis[find(i)]);
    puts("");
    for (int i = 1; i <= m; ++i) printf("%d ", dis[find(n + i)]);
    puts("");
  } else
    puts("No");
  return 0;
}
