#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> graph[2005];
int ans[2005];
int father[2005];
int inedge[2005];
char inputs[1005][1005];
int avai;
int find(int a) {
  if (a != father[a]) father[a] = find(father[a]);
  return father[a];
}
int que[2005], head, tail;
int main() {
  cin >> n >> m;
  avai = n + m;
  for (int i = 1; i <= n + m; i++) father[i] = i;
  for (int i = 1; i <= n; i++) {
    getchar();
    for (int j = 1; j <= m; j++) {
      inputs[i][j] = getchar();
      if (inputs[i][j] == '=') {
        father[find(n + j)] = find(i);
        avai--;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (inputs[i][j] != '=' && find(i) == find(n + j)) {
        cout << "No";
        return 0;
      }
      if (inputs[i][j] == '>') {
        graph[find(n + j)].push_back(find(i));
        inedge[find(i)]++;
      } else if (inputs[i][j] == '<') {
        graph[find(i)].push_back(find(n + j));
        inedge[find(n + j)]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (find(i) != i) continue;
    if (!inedge[i]) {
      que[tail++] = i;
      ans[i] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    if (find(i + n) != n + i) continue;
    if (!inedge[i + n]) {
      que[tail++] = i + n;
      ans[n + i] = 1;
    }
  }
  int c;
  while (head < tail) {
    c = que[head];
    for (int i = 0; i < graph[c].size(); i++) {
      ans[graph[c][i]] = max(ans[graph[c][i]], ans[c] + 1);
      inedge[graph[c][i]]--;
      if (!inedge[graph[c][i]]) que[tail++] = graph[c][i];
    }
    head++;
  }
  if (tail < avai) {
    cout << "No";
  } else {
    cout << "Yes" << endl;
    for (int i = 1; i <= n; i++) cout << ans[find(i)] << " ";
    cout << endl;
    for (int i = 1; i <= m; i++) cout << ans[find(n + i)] << " ";
  }
  return 0;
}
