#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long Mod = 1e9 + 7;
int n, m;
char A[1005][1005];
int dsu[2005], parent[2005], depth[2005];
vector<int> G[2005];
bool vis[2005], grey[2005], ultimate = true;
void dfs(int u) {
  depth[u] = 1;
  vis[u] = true;
  grey[u] = true;
  for (auto it : G[u]) {
    if (!vis[it]) {
      dfs(it);
    } else if (grey[it])
      ultimate = false;
    depth[u] = max(depth[u], depth[it] + 1);
  }
  grey[u] = false;
}
int find_parent(int i) {
  while (parent[i] != i) i = parent[i];
  return i;
}
void merge(int a, int b) {
  int p_a = find_parent(a), p_b = find_parent(b);
  if (p_a == p_b)
    return;
  else
    parent[p_b] = p_a;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n + m; i++) {
    dsu[i] = i;
    parent[i] = i;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> A[i][j];
      if (A[i][j] == '=') {
        merge(i, n + j);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (A[i][j] == '=') continue;
      int a = find_parent(i), b = find_parent(n + j);
      if (A[i][j] == '<') swap(a, b);
      G[a].push_back(b);
    }
  }
  for (int i = 0; i < n + m; i++) {
    if (find_parent(i) == i && !vis[i]) dfs(i);
  }
  if (ultimate) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) cout << depth[find_parent(i)] << " ";
    cout << endl;
    for (int i = 0; i < m; i++) cout << depth[find_parent(n + i)] << " ";
    cout << endl;
  } else
    cout << "No" << endl;
  return 0;
}
