#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 1e3 + 5;
int n, m, par[2 * N], sz[2 * N];
int id[2 * N], ans[2 * N];
vector<int> g[2 * N];
bool vis[2 * N], in[2 * N];
char a[N][N];
int find(int u) { return par[u] == u ? u : par[u] = find(par[u]); }
void join(int u, int v) {
  u = find(u), v = find(v);
  if (u == v) return;
  if (sz[u] < sz[v]) swap(u, v);
  par[v] = u, sz[u] += sz[v];
}
void dfs(int node) {
  vis[node] = true;
  int c = 0;
  for (auto &i : g[node]) {
    if (!vis[i]) dfs(i);
    c = max(ans[find(i)], c);
  }
  ans[find(node)] = c + 1;
}
void dfs2(int node) {
  vis[node] = true;
  in[node] = true;
  for (auto &i : g[node]) {
    if (in[i]) {
      cout << "No";
      exit(0);
    }
    if (!vis[i]) dfs2(i);
  }
  in[node] = false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    par[i] = i, sz[i] = 1;
  }
  for (int i = 0; i < m; i++) {
    par[n + i] = n + i;
    sz[n + i] = 1;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (a[i][j] == '=') join(i, n + j);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '=') continue;
      int u = find(i), v = find(n + j);
      if (u == v) return cout << "No", 0;
      if (a[i][j] == '<')
        g[v].push_back(u), id[u]++;
      else
        g[u].push_back(v), id[v]++;
    }
  for (int i = 0; i < n + m; i++) {
    dfs2(i);
    memset(vis, 0, sizeof vis);
  }
  for (int i = 0; i < n + m; i++)
    if (i == find(i) && !vis[i] && !id[i]) dfs(i);
  cout << "Yes\n";
  for (int i = 0; i < n + m; i++) {
    if (i == n) cout << '\n';
    cout << ans[find(i)] << " ";
  }
  return 0;
}
