#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
int n, m, father[maxn << 1], ru[maxn << 1], vis[maxn << 1], ans[maxn << 1];
vector<int> g[maxn << 1];
char s[maxn][maxn];
int findfather(int x) {
  if (x == father[x]) return x;
  int i = findfather(father[x]);
  father[x] = i;
  return i;
}
void unit(int a, int b) {
  int fa = findfather(a), fb = findfather(b);
  if (fa != fb) father[fa] = fb;
}
int main() {
  queue<int> q;
  scanf("%d%d", &n, &m);
  for (int i = 0; i <= n + m; ++i) father[i] = i;
  for (int i = 1; i <= n; ++i) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (s[i][j] == '=') unit(i, j + n);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j)
      if (s[i][j] == '<')
        g[findfather(i)].push_back(findfather(j + n)), ru[findfather(j + n)]++;
      else if (s[i][j] == '>')
        g[findfather(j + n)].push_back(findfather(i)), ru[findfather(i)]++;
  for (int i = 1; i <= n + m; ++i)
    if (ru[i] == 0) q.push(i), vis[i] = 1, ans[i] = 1;
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    for (int to : g[t]) {
      if (vis[to]) continue;
      ru[to]--;
      if (ru[to] == 0) q.push(to), ans[to] = ans[t] + 1, vis[to] = 1;
    }
  }
  for (int i = 1; i <= n + m; ++i)
    if (i == findfather(i) && !vis[i]) {
      puts("No");
      return 0;
    }
  puts("Yes");
  for (int i = 1; i <= n; ++i)
    printf("%d%s", ans[findfather(i)], (i == n) ? "\n" : " ");
  for (int i = 1; i <= m; ++i)
    printf("%d%s", ans[findfather(i + n)], (i == m) ? "\n" : " ");
}
