#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
bool vis[N] = {false};
bool flag = 0;
int d[N];
vector<pair<int, int> > adj[N];
void dfs(int s) {
  vis[s] = 1;
  int v, c;
  for (int i = 0; i < adj[s].size(); i++) {
    v = adj[s][i].first;
    c = adj[s][i].second;
    if (d[v] < d[s] + c) {
      d[v] = d[s] + c;
      if (vis[v]) {
        flag = 1;
        return;
      }
      dfs(v);
    }
  }
  vis[s] = 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i <= n + m; i++) {
    d[i] = 0;
  }
  string s;
  for (int i = 1; i <= n; i++) {
    cin >> s;
    s = '0' + s;
    for (int j = 1; j <= m; j++) {
      if (s[j] == '=') {
        adj[i].push_back({n + j, 0});
        adj[n + j].push_back({i, 0});
      } else if (s[j] == '<') {
        adj[i].push_back({n + j, 1});
      } else if (s[j] == '>') {
        adj[n + j].push_back({i, 1});
      }
    }
  }
  for (int i = 1; i <= n + m; i++) {
    dfs(i);
  }
  if (flag == 1) {
    cout << "No";
    return 0;
  }
  cout << "Yes\n";
  for (int i = 1; i <= n; i++) {
    cout << d[i] + 1 << " ";
  }
  cout << "\n";
  for (int i = n + 1; i <= n + m; i++) {
    cout << d[i] + 1 << " ";
  }
}
