#include <bits/stdc++.h>
using namespace std;
int cc, to[1000010], net[1000010], fr[3000], ind[3000], fa[3000];
int q[3000], ans[3000], n, m;
char ch[1010][1010];
void addedge(int u, int v) {
  cc++;
  to[cc] = v;
  net[cc] = fr[u];
  fr[u] = cc;
  ind[v]++;
}
int fafa(int x) {
  if (fa[x] == x) return x;
  return fa[x] = fafa(fa[x]);
}
void hebing(int x, int y) {
  x = fafa(x);
  y = fafa(y);
  fa[x] = y;
}
bool topsort() {
  int h = 1, t = 0;
  for (int i = 1; i <= n + m; i++)
    if (!ind[i]) q[++t] = i, ans[i] = 1;
  while (h <= t) {
    for (int i = fr[q[h]]; i; i = net[i]) {
      ind[to[i]]--;
      if (ind[to[i]] == 0) {
        q[++t] = to[i];
        ans[to[i]] = ans[q[h]] + 1;
      }
    }
    h++;
  }
  for (int i = 1; i <= n + m; i++)
    if (ind[fafa(i)]) return false;
  return true;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n + m; i++) {
    fa[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> ch[i];
    for (int j = 1; j <= m; j++) {
      if (ch[i][j - 1] == '=') hebing(i, j + n);
    }
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (ch[i][j - 1] == '<') addedge(fafa(i), fafa(j + n));
      if (ch[i][j - 1] == '>') addedge(fafa(j + n), fafa(i));
    }
  if (topsort()) {
    cout << "Yes\n";
    for (int i = 1; i <= n; i++) {
      cout << ans[fafa(i)] << " ";
    }
    cout << endl;
    for (int i = 1 + n; i <= m + n; i++) {
      cout << ans[fafa(i)] << " ";
    }
  } else
    cout << "No\n";
  return 0;
}
