#include <bits/stdc++.h>
using namespace std;
int N, M, n;
char a[2000][2000];
bool G[2000][2000];
int comp[2000], C = 0, smaller[2000], val[2000];
queue<int> todo;
void eq_DFS(int u) {
  comp[u] = C;
  for (int v = 0; v < n; v++)
    if (a[u][v] == '=' && comp[v] == -1) eq_DFS(v);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M;
  for (int i = 0; i < N; i++)
    for (int j = 0; j < M; j++) {
      cin >> a[i][j + N];
      if (a[i][j + N] == '=')
        a[j + N][i] = '=';
      else if (a[i][j + N] == '<')
        a[j + N][i] = '>';
      else
        a[j + N][i] = '<';
    }
  n = N + M;
  for (int i = 0; i < n; i++) comp[i] = -1;
  for (int i = 0; i < n; i++) {
    if (comp[i] == -1) {
      eq_DFS(i);
      C++;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i][j] == '<')
        G[comp[i]][comp[j]] = true;
      else if (a[i][j] == '>')
        G[comp[j]][comp[i]] = true;
    }
  }
  for (int i = 0; i < C; i++) {
    for (int j = 0; j < C; j++) {
      if (G[i][j]) smaller[j]++;
    }
  }
  int act = 1;
  while (true) {
    for (int i = 0; i < C; i++)
      if (smaller[i] == 0 && val[i] == 0) todo.push(i);
    if (todo.empty()) break;
    while (!todo.empty()) {
      int i = todo.front();
      todo.pop();
      val[i] = act;
      for (int j = 0; j < n; j++)
        if (G[i][j]) smaller[j]--;
    }
    act++;
  }
  for (int i = 0; i < C; i++) {
    if (val[i] == 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if ((a[i][j] == '=' && comp[i] != comp[j]) ||
          (a[i][j] == '<' && val[comp[i]] >= val[comp[j]]) ||
          (a[i][j] == '>' && val[comp[i]] <= val[comp[j]])) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < N; i++) cout << val[comp[i]] << " ";
  cout << endl;
  for (int i = N; i < N + M; i++) cout << val[comp[i]] << " ";
  cout << endl;
  return 0;
}
