#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
const int M = 1e6 + 5;
int n, m;
char ch[N][N];
int fa[N], num[N], d[N], d2[N];
int Next[M], ver[M], tot, head[N], ans;
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
void add(int x, int y) {
  ver[++tot] = y;
  Next[tot] = head[x];
  head[x] = tot;
}
queue<int> q;
void topu() {
  for (int i = 0; i < n + m; i++) {
    if (d[i] == 0 && d2[i]) {
      q.push(i);
      num[i] = 1;
    }
    if (d[i] == 0 && d2[i] == 0) ans++;
  }
  while (q.size()) {
    int x = q.front();
    q.pop();
    ans++;
    for (int i = head[x]; i; i = Next[i]) {
      int y = ver[i];
      if (--d[y] == 0) {
        q.push(y);
        num[y] = num[x] + 1;
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%s", ch[i]);
  for (int i = 0; i <= n + m; i++) fa[i] = i, num[i] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ch[i][j] == '=') {
        if (find(i) != find(n + j)) fa[find(i)] = find(n + j);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ch[i][j] == '<' || ch[i][j] == '>') {
        if (find(i) == find(n + j)) {
          cout << "No" << endl;
          return 0;
        }
      }
      if (ch[i][j] == '<') {
        add(find(i), find(n + j));
        d[find(n + j)]++;
        d2[find(i)]++;
      } else if (ch[i][j] == '>') {
        add(find(n + j), find(i));
        d[find(i)]++;
        d2[find(n + j)]++;
      }
    }
  }
  topu();
  if (ans != n + m) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ch[i][j] == '=') {
        num[i] = num[find(i)];
        num[n + j] = num[find(n + j)];
      }
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) cout << num[i] << " ";
  cout << endl;
  for (int i = n; i < n + m; i++) cout << num[i] << " ";
  cout << endl;
  return 0;
}
