#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int n, m;
char c;
vector<pair<int, int> > vec[maxn * 2];
int du[maxn * 2];
int dis[maxn * 2], vis[maxn * 2], cnt[maxn * 2];
const int INF = 0x3f3f3f3f;
bool spfa(int s) {
  memset(dis, -1, sizeof(dis));
  memset(vis, 0, sizeof(vis));
  queue<int> que;
  que.push(s);
  dis[s] = 0;
  vis[s] = 1;
  cnt[s] = 1;
  while (!que.empty()) {
    int u = que.front();
    que.pop();
    vis[u] = 0;
    for (int i = 0; i < vec[u].size(); i++) {
      int v = vec[u][i].first, cost = vec[u][i].second;
      if (dis[v] < dis[u] + cost) {
        dis[v] = dis[u] + cost;
        if (!vis[v]) {
          cnt[v]++;
          if (cnt[v] >= n + m + 1) return 0;
          vis[v] = 1;
          que.push(v);
        } else {
        }
      }
    }
  }
  return 1;
}
char s[1005][1005];
int main() {
  scanf("%d %d", &n, &m);
  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] == '>') {
        vec[j + n].push_back(make_pair(i, 1));
      } else if (s[i][j] == '<') {
        vec[i].push_back(make_pair(j + n, 1));
      } else {
        vec[j + n].push_back(make_pair(i, 0));
        vec[i].push_back(make_pair(j + n, 0));
      }
    }
  }
  for (int i = 1; i <= n + m; i++) {
    vec[0].push_back(make_pair(i, 1));
  }
  bool ok = spfa(0);
  if (ok) {
    for (int i = 1; i <= n + m; i++) {
      if (dis[i] == -1) {
        ok = false;
        break;
      }
    }
  }
  if (ok) {
    puts("Yes");
    for (int i = 1; i <= n; i++) {
      printf("%d ", dis[i]);
    }
    printf("\n");
    for (int i = n + 1; i <= n + m; i++) {
      printf("%d ", dis[i]);
    }
    printf("\n");
  } else {
    puts("No");
  }
  return 0;
}
