#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 7;
const int mod = 1e9 + 7;
const long long INFLL = 0x3f3f3f3f3f3f3f3fLL;
const int INF = 0x3f3f3f3f;
using namespace std;
int n, m, a[maxn], fa[maxn], du[maxn];
char mp[maxn][maxn];
vector<int> v[maxn];
int Find(int x) { return fa[x] == x ? x : fa[x] = Find(fa[x]); }
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < maxn; i++) fa[i] = i;
  for (int i = 1; i <= n; i++) {
    scanf("%s", mp[i] + 1);
    for (int j = 1; j <= m; j++)
      if (mp[i][j] == '=') fa[Find(i)] = Find(j + n);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mp[i][j] == '>') v[Find(n + j)].push_back(Find(i)), du[Find(i)]++;
      if (mp[i][j] == '<') v[Find(i)].push_back(Find(n + j)), du[Find(j + n)]++;
    }
  }
  queue<int> q;
  for (int i = 1; i <= n + m; i++)
    if (Find(i) == i && du[i] == 0) q.push(i), a[i] = 1;
  while (!q.empty()) {
    int cnt = q.front();
    q.pop();
    for (int i = 0; i < v[cnt].size(); i++) {
      int nxt = v[cnt][i];
      du[nxt]--;
      if (du[nxt] == 0) q.push(nxt), a[nxt] = a[cnt] + 1;
    }
  }
  for (int i = 1; i <= n + m; i++)
    if (a[Find(i)] == 0) return 0 * printf("No\n");
  printf("Yes\n");
  for (int i = 1; i <= n; i++) printf("%d ", a[Find(i)]);
  printf("\n");
  for (int i = n + 1; i <= n + m; i++) printf("%d ", a[Find(i)]);
  printf("\n");
  return 0;
}
