#include <bits/stdc++.h>
using namespace std;
int power(int x, unsigned int y, int p) {
  int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int mI(int a, int m) { return power(a, m - 2, m); }
class ds {
  vector<int> v1;
  unordered_map<int, int> parent;
  unordered_map<int, int> rank1;

 public:
  ds(vector<int> v) {
    v1 = v;
    for (int t : v1) {
      parent[t] = t;
      rank1[t] = 0;
    }
  }
  void union1(int a, int b) {
    a = find(a);
    b = find(b);
    if (rank1[a] > rank1[b]) {
      parent[b] = a;
    } else if (rank1[b] > rank1[a]) {
      parent[a] = b;
    } else {
      parent[a] = b;
      rank1[b]++;
    }
  }
  int find(int x) {
    if (parent[x] == x)
      return x;
    else
      return find(parent[x]);
  }
};
vector<int> par;
vector<vector<int> > g;
vector<int> vis;
vector<int> viss;
int dfs(int i) {
  if (vis[i] == 1) {
    return 1e9 - 1;
  }
  if (viss[i] != 0) return viss[i];
  vis[i] = 1;
  int c = 1;
  for (auto it : g[i]) {
    c = max(c, 1 + dfs(it));
  }
  vis[i] = 0;
  return viss[i] = c;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<int> v1(n + m);
  for (int i = 0; i < n + m; i++) v1[i] = i;
  ds ans(v1);
  vector<string> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '=') {
        ans.union1(i, n + j);
      }
    }
  }
  par.resize(n + m);
  for (int i = 0; i < n + m; i++) par[i] = ans.find(i);
  g.resize(n + m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '>')
        g[par[i]].push_back(par[n + j]);
      else if (v[i][j] == '<')
        g[par[n + j]].push_back(par[i]);
    }
  }
  vector<int> anss(n + m, 0);
  vis.resize(n + m, 0);
  for (int i = 0; i < n + m; i++) {
    if (anss[par[i]] != 0) {
      anss[i] = anss[par[i]];
    } else {
      vis.clear();
      vis.resize(n + m, 0);
      viss.clear();
      viss.resize(n + m, 0);
      int val = dfs(par[i]);
      if (val >= 1e9) {
        cout << "No";
        return 0;
      }
      anss[i] = val;
      anss[par[i]] = val;
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) cout << anss[i] << " ";
  cout << endl;
  for (int i = n; i < n + m; i++) cout << anss[i] << " ";
}
