#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  ~debug() { cerr << endl; }
  template <class c>
  typename enable_if<sizeof dud<c>(0) != 1, debug &>::type operator<<(c i) {
    cerr << boolalpha << i;
    return *this;
  }
  template <class c>
  typename enable_if<sizeof dud<c>(0) == 1, debug &>::type operator<<(c i) {
    return *this << range(begin(i), end(i));
  }
  template <class c, class b>
  debug &operator<<(pair<b, c> d) {
    return *this << "(" << d.first << ", " << d.second << ")";
  }
  template <class c>
  debug &operator<<(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
    return *this << "]";
  }
};
int n, m;
vector<int> adj[1000001];
vector<int> eq[100001];
vector<int> visited(100011);
vector<int> top_order;
bool possible;
vector<bool> used(100001);
void dfs(int v) {
  used[v] = 1;
  for (int to : adj[v]) {
    if (!used[to]) {
      dfs(to);
    }
  }
  top_order.push_back(v);
}
int c;
bool topological_sort() {
  visited.assign(n + 1, 0);
  top_order.clear();
  for (int i = 0; i < c; ++i) {
    if (visited[i] == 0) dfs(i);
  }
  if (possible == 1) return false;
  return true;
}
vector<int> ans(100001, 0);
int comp[100001];
void dfs1(int v, int col) {
  comp[v] = col;
  for (auto it : eq[v]) {
    if (comp[it] == -1) dfs1(it, col);
  }
}
void solve() {
  cin >> n >> m;
  char mat[n][m];
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++) {
      mat[i][j] = s[j];
      if (s[j] == '=') {
        eq[i].push_back(n + j);
        eq[n + j].push_back(i);
      }
    }
  }
  memset(comp, -1, sizeof(comp));
  for (int i = 0; i < n + m; ++i) {
    if (comp[i] == -1) {
      dfs1(i, c);
      cerr << endl;
      ++c;
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (mat[i][j] == '>') {
        adj[comp[i]].push_back(comp[n + j]);
      } else if (mat[i][j] == '<') {
        adj[comp[n + j]].push_back(comp[i]);
      }
    }
  }
  bool ok = topological_sort();
  for (auto it : top_order) {
    int ma = 0;
    for (auto to : adj[it]) {
      if (ans[to] == 0) {
        cout << "NO" << endl;
        return;
      }
      ma = max(ma, ans[to]);
    }
    ans[it] = ma + 1;
  }
  puts("Yes");
  for (int i = 0; i < n; ++i) {
    printf("%d ", ans[comp[i]]);
  }
  puts("");
  for (int i = 0; i < m; ++i) {
    printf("%d ", ans[comp[n + i]]);
  }
  puts("");
}
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
