#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 5;
int p[N], indeg[N], ans[N];
char c[N][N];
vector<int> edge[N];
int findx(int x) { return x == p[x] ? x : findx(p[x]); }
void unite(int x, int y) {
  x = findx(x);
  y = findx(y);
  p[x] = y;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  int total = n + m;
  for (int i = 0; i < total; i++) p[i] = i;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> c[i][j];
      if (c[i][j] == '=') unite(i, n + j);
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (c[i][j] == '>') {
        edge[findx(n + j)].push_back(findx(i));
        indeg[findx(i)]++;
      } else if (c[i][j] == '<') {
        edge[findx(i)].push_back(findx(n + j));
        indeg[findx(n + j)]++;
      }
    }
  }
  queue<int> q;
  for (int i = 0; i < total; i++)
    if (!indeg[i]) {
      q.push(i);
      ans[i] = 1;
    }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (auto v : edge[u]) {
      --indeg[v];
      if (indeg[v] == 0) {
        q.push(v);
        ans[v] = ans[u] + 1;
      }
    }
  }
  bool have_circle = false;
  for (int i = 0; i < total; i++) {
    if (indeg[i]) have_circle = true;
  }
  if (have_circle)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) {
      cout << ans[findx(i)] << " \n"[i == n - 1];
    }
    for (int i = 0; i < m; i++) {
      cout << ans[findx(n + i)] << " \n"[i == m - 1];
    }
  }
  return 0;
}
