#include <bits/stdc++.h>
using namespace std;
vector<int> g[2007];
char s[1007][1007];
int fa[2007], vis[2007], shu[2007];
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
int flag = 0;
void dfs(int u) {
  vis[u] = -1;
  shu[u] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (vis[v] == -1) {
      flag = 1;
      return;
    } else if (vis[v]) {
      shu[u] = max(shu[u], shu[v] + 1);
    } else
      dfs(v), shu[u] = max(shu[u], shu[v] + 1);
  }
  vis[u] = 1;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n + m; i++) fa[i] = i;
  for (int i = 1; i <= n; i++) {
    scanf("%s", s[i] + 1);
    for (int k = 1; k <= m; k++) {
      if (s[i][k] == '=') {
        int x = find(i), y = find(n + k);
        if (x != y) fa[x] = y;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int k = 1; k <= m; k++) {
      int x = find(i), y = find(n + k);
      if (s[i][k] == '>') {
        if (x == y) flag = 1;
        g[x].push_back(y);
      } else if (s[i][k] == '<') {
        if (x == y) flag = 1;
        g[y].push_back(x);
      }
    }
  }
  for (int i = 1; i <= n + m; i++) {
    int x = find(i);
    if (!vis[x]) {
      dfs(x);
    }
  }
  if (flag) {
    printf("No");
    return 0;
  } else
    printf("Yes\n");
  for (int i = 1; i <= n; i++) {
    int x = find(i);
    printf("%d ", shu[x]);
  }
  cout << "\n";
  for (int k = 1; k <= m; k++) {
    int x = find(n + k);
    printf("%d ", shu[x]);
  }
  return 0;
}
