#include <bits/stdc++.h>
using namespace std;
char c[1010][1010];
vector<int> v[2010];
int n, m, p[2010], val[2010], deg[2010];
bool vis[2010], flag;
int find_set(int x) {
  if (p[x] == x) return x;
  return p[x] = find_set(p[x]);
}
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n + m; i++) p[i] = i;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int x = i, y = j + n;
      cin >> c[i][j];
      if (c[i][j] == '=') {
        int rootx = find_set(x), rooty = find_set(y);
        p[rootx] = rooty;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      int x = i, y = j + n;
      if (c[i][j] == '<') {
        flag = true;
        int rootx = find_set(x), rooty = find_set(y);
        v[rootx].push_back(rooty);
        deg[rooty]++;
      } else if (c[i][j] == '>') {
        flag = true;
        int rootx = find_set(x), rooty = find_set(y);
        v[rooty].push_back(rootx);
        deg[rootx]++;
      }
    }
  }
  if (!flag) {
    cout << "Yes\n";
    for (int i = 1; i <= n; i++) cout << 1 << " ";
    cout << endl;
    for (int j = 1; j <= m; j++) cout << 1 << " ";
    cout << endl;
    return 0;
  }
  queue<int> q;
  for (int i = 1; i <= n + m; i++)
    if (p[i] == i && deg[i] == 0) {
      q.push(i);
      vis[i] = 1;
      val[i] = 1;
    }
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    for (int i = 0; i < v[t].size(); i++) {
      if (v[t][i] == t) {
        cout << "No" << endl;
        exit(0);
      }
      deg[v[t][i]]--;
      if (deg[v[t][i]] == 0) {
        val[v[t][i]] = val[t] + 1;
        vis[v[t][i]] = 1;
        q.push(v[t][i]);
      }
    }
  }
  for (int i = 1; i <= n + m; i++)
    if (p[i] == i && !vis[i]) {
      cout << "No" << endl;
      exit(0);
    }
  cout << "Yes" << endl;
  for (int i = 1; i <= n; i++) {
    cout << val[find_set(i)] << " ";
  }
  cout << endl;
  for (int j = 1; j <= m; j++) {
    cout << val[find_set(j + n)] << " ";
  }
  cout << endl;
  return 0;
}
