#include <bits/stdc++.h>
using namespace std;
int n, m;
char sym[1000][1000 + 1];
vector<int> f;
int getF(int x) { return f[x] == x ? x : f[x] = getF(f[x]); }
void read_data() {
  cin >> n >> m;
  f.resize(n + m);
  for (int i = 0; i < n + m; i++) f[i] = i;
  for (int i = 0; i < n; i++) {
    scanf(" %s", sym[i]);
    for (int j = 0; j < m; j++)
      if (sym[i][j] == '=') {
        int fi = getF(i);
        int fj = getF(n + j);
        f[fi] = fj;
      }
  }
}
bool deal() {
  vector<vector<bool> > g;
  vector<int> cnt;
  cnt.assign(n + m, -1);
  for (int i = 0; i < n + m; i++) cnt[getF(i)] = 0;
  g.resize(n + m);
  for (int i = 0; i < n + m; i++) g[i].assign(n + m, false);
  for (int i = 0; i < n; i++) {
    int fi = getF(i);
    for (int j = 0; j < m; j++) {
      int fj = getF(j + n);
      if (fi == fj && sym[i][j] != '=') return false;
      if (sym[i][j] == '>' && !g[fj][fi]) {
        g[fj][fi] = true;
        cnt[fi]++;
      } else if (sym[i][j] == '<' && !g[fi][fj]) {
        g[fi][fj] = true;
        cnt[fj]++;
      }
    }
  }
  vector<int> ans;
  ans.resize(n + m);
  queue<int> q;
  for (int i = 0; i < n + m; i++)
    if (cnt[i] == 0) {
      q.push(i);
      ans[i] = 1;
    }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0; i < n + m; i++)
      if (g[u][i]) {
        cnt[i]--;
        ans[i] = max(ans[i], ans[u] + 1);
        if (cnt[i] == 0) q.push(i);
      }
  }
  for (int i = 0; i < n + m; i++)
    if (cnt[i] > 0) return false;
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) {
    int fi = getF(i);
    cout << ans[fi] << ' ';
  }
  cout << endl;
  for (int j = 0; j < m; j++) {
    int fj = getF(j + n);
    cout << ans[fj] << ' ';
  }
  cout << endl;
  return true;
}
int main() {
  read_data();
  if (!deal()) {
    cout << "No" << endl;
  }
  return 0;
}
