#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int v, w;
} edge[1000000 * 2 + 10];
int d[1010 * 2], cnt[1010 * 2];
vector<int> G[1010 * 2];
bool vis[1010 * 2];
bool spfa(int n, int m) {
  memset(cnt, 0, sizeof(cnt));
  memset(d, 0, sizeof(d));
  memset(vis, true, sizeof(vis));
  queue<int> qu;
  for (int i = 1; i <= n + m; ++i) qu.push(i);
  while (!qu.empty()) {
    int v = qu.front();
    qu.pop();
    vis[v] = false;
    for (int i = 0; i < G[v].size(); ++i) {
      Edge &e = edge[G[v][i]];
      if (d[e.v] > d[v] + e.w) {
        d[e.v] = d[v] + e.w;
        if (!vis[e.v]) {
          vis[e.v] = true;
          cnt[e.v]++;
          if (cnt[e.v] > n + m) return false;
          qu.push(e.v);
        }
      }
    }
  }
  return true;
}
int main(void) {
  int n, m;
  char op;
  scanf("%d%d", &n, &m);
  int edge_cnt = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      scanf(" %c", &op);
      if (op == '=') {
        edge[edge_cnt].v = j + n;
        edge[edge_cnt].w = 0;
        G[i].push_back(edge_cnt++);
        edge[edge_cnt].v = i;
        edge[edge_cnt].w = 0;
        G[j + n].push_back(edge_cnt++);
      } else if (op == '>') {
        edge[edge_cnt].v = j + n;
        edge[edge_cnt].w = -1;
        G[i].push_back(edge_cnt++);
      } else {
        edge[edge_cnt].v = i;
        edge[edge_cnt].w = -1;
        G[j + n].push_back(edge_cnt++);
      }
    }
  }
  if (!spfa(n, m))
    printf("NO\n");
  else {
    printf("YES\n");
    int minx = 0x3f3f3f3f;
    for (int i = 1; i <= n + m; ++i) minx = min(minx, d[i]);
    int add = minx <= 0 ? 1 - minx : 0;
    for (int i = 1; i <= n; ++i) printf("%d ", d[i] + add);
    printf("\n");
    for (int i = n + 1; i <= n + m; ++i) printf("%d ", d[i] + add);
    printf("\n");
  }
  return 0;
}
