#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
char ara[1005][1005];
int par[2005], levv[2005], mini;
vector<int> ls[2005];
bool vis[2005], app[2005], p;
int findp(int x) {
  if (par[x] == x) return x;
  return par[x] = findp(par[x]);
}
void dfs(int x, int lev) {
  app[x] = true;
  mini = min(mini, lev);
  int ret = 0;
  for (int v : ls[findp(x)]) {
    if (levv[findp(v)] > lev - 1) {
      if (app[findp(v)]) {
        p = true;
        return;
      }
      levv[findp(v)] = min(levv[findp(v)], lev - 1);
      dfs(findp(v), levv[findp(v)]);
      if (p) return;
    }
  }
  vis[findp(x)] = true;
  app[x] = false;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n + m; i++) par[i] = i;
  p = false;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      ara[i][j] = c;
      int fi = findp(i + m);
      int fj = findp(j);
      if (c == '=') par[fi] = fj;
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      char c;
      c = ara[i][j];
      int fi = findp(i + m);
      int fj = findp(j);
      if (c != '=' && fi == fj) p = true;
      if (c == '>')
        ls[fi].push_back(fj);
      else if (c == '<')
        ls[fj].push_back(fi);
    }
  if (p) return cout << "No" << endl, 0;
  for (int i = 0; i < n + m; i++)
    if (ls[findp(i)].size() > 0 && vis[findp(i)] == 0) dfs(findp(i), 0);
  if (p) return cout << "No" << endl, 0;
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) cout << levv[findp(i + m)] - mini + 1 << " ";
  cout << endl;
  for (int i = 0; i < m; i++) cout << levv[findp(i)] - mini + 1 << " ";
}
