#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long n, m;
vector<long long> parent;
vector<long long> ra;
vector<pair<long long, long long> > edges;
vector<vector<long long> > adj;
vector<bool> vis;
vector<long long> depth;
vector<long long> instack;
long long get_parent(long long a) {
  if (a == parent[a]) return a;
  return parent[a] = get_parent(parent[a]);
}
void join(long long a, long long b) {
  a = get_parent(a);
  b = get_parent(b);
  if (a != b) {
    if (ra[b] > ra[a]) swap(a, b);
    parent[b] = a;
    if (ra[a] == ra[b]) ra[a]++;
  }
}
bool cycle_rec(long long node) {
  vis[node] = true;
  instack[node] = true;
  for (auto child : adj[node]) {
    if (!vis[child] and cycle_rec(child)) return true;
    if (instack[child]) return true;
  }
  instack[node] = false;
  return false;
}
bool cycle_exist() {
  for (long long i = 0; i < n + m; i++)
    if (!vis[get_parent(i)] and cycle_rec(i)) return true;
  return false;
}
void find_depth(long long node) {
  if (depth[node] != -1) return;
  vis[node] = true;
  long long d = 0;
  for (auto child : adj[node]) {
    find_depth(child);
    d = max(d, depth[child]);
  }
  depth[node] = d + 1;
  vis[node] = false;
}
int32_t main() {
  fast();
  cin >> n >> m;
  parent.resize(n + m);
  ra.resize(n + m);
  for (long long i = 0; i < parent.size(); i++) {
    parent[i] = i;
    ra[i] = 0;
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      char ch;
      cin >> ch;
      if (ch == '=')
        join(i, n + j);
      else if (ch == '>')
        edges.push_back({i, n + j});
      else
        edges.push_back({n + j, i});
    }
  }
  adj.resize(n + m), vis.resize(n + m, false), instack.resize(n + m, false),
      depth.resize(n + m, -1);
  for (auto e : edges) adj[get_parent(e.first)].push_back(get_parent(e.second));
  if (cycle_exist()) {
    cout << "No\n";
    return 0;
  }
  for (long long i = 0; i < n + m; i++) vis[i] = false;
  for (long long i = 0; i < n + m; i++)
    if (!vis[i]) find_depth(i);
  cout << "Yes\n";
  for (long long i = 0; i < n; i++) cout << depth[get_parent(i)] << " ";
  cout << "\n";
  for (long long j = 0; j < m; j++) cout << depth[get_parent(n + j)] << " ";
  cout << "\n";
  return 0;
}
