#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5;
namespace DSU {
int fa[MAXN << 1];
void init(int n) {
  for (int i = 1; i <= n; i++) fa[i] = i;
}
int Find(int x) { return x == fa[x] ? x : fa[x] = Find(fa[x]); }
bool Union(int x, int y) {
  x = Find(x), y = Find(y);
  if (x == y) return 0;
  return fa[x] = y, 1;
}
}  // namespace DSU
using namespace DSU;
char s[MAXN][MAXN];
int n, m;
vector<int> E[MAXN << 1], G[MAXN << 1];
int ans[MAXN << 1], in[MAXN << 1], res[MAXN << 1];
bool vis[MAXN << 1];
void bfs() {
  queue<int> Q;
  memset(vis, false, sizeof(vis));
  for (int i = 1; i <= n + m; i++) {
    int x = Find(i);
    if (vis[x]) continue;
    in[x] = E[x].size();
    vis[x] = true;
    if (in[x] == 0) {
      ans[x] = 1;
      Q.push(x);
    }
  }
  while (!Q.empty()) {
    int x = Q.front();
    Q.pop();
    for (auto v : G[x]) {
      in[v]--;
      if (in[v] == 0) {
        ans[v] = ans[x] + 1;
        Q.push(v);
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  init(n + m);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '=') {
        Union(i, n + j);
      }
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      int x = Find(i), y = Find(n + j);
      if (s[i][j] == '>') E[x].push_back(y), G[y].push_back(x);
      if (s[i][j] == '<') E[y].push_back(x), G[x].push_back(y);
    }
  bfs();
  for (int i = 1; i <= n + m; i++) {
    int x = Find(i);
    if (ans[x] == 0) return 0 * puts("No");
    res[i] = ans[x];
  }
  puts("Yes");
  for (int i = 1; i <= n; i++) printf("%d ", res[i]);
  puts("");
  for (int i = n + 1; i <= n + m; i++) printf("%d ", res[i]);
  puts("");
  return 0;
}
