#include <bits/stdc++.h>
using namespace std;
int n, m;
char mp[1005][1005];
int pre[2 * 1005];
int in[2 * 1005];
int ans[2 * 1005];
vector<int> g[2 * 1005];
struct no {
  int a, c;
};
int found(int x) {
  int re = x;
  while (re != pre[re]) {
    re = pre[re];
  }
  while (x != pre[x]) {
    int t = pre[x];
    pre[x] = re;
    x = t;
  }
  return re;
}
void join(int x, int y) {
  int fx = found(x), fy = found(y);
  if (fx != fy) {
    pre[fx] = pre[fy];
  }
}
void addarc(int from, int to) {
  g[from].push_back(to);
  in[to]++;
}
void topo(int st) {
  queue<no> q;
  q.push((no){st, 1});
  while (!q.empty()) {
    no now = q.front();
    q.pop();
    ans[now.a] = now.c;
    for (int i = 0; i < (int)g[now.a].size(); i++) {
      int to = g[now.a][i];
      in[to]--;
      if (in[to] == 0) q.push((no){to, now.c + 1});
    }
    g[now.a].clear();
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> mp[i];
  int kk = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mp[i][j] != '=') {
        kk = 1;
      }
    }
  }
  if (kk == 0) {
    cout << "Yes" << endl;
    for (int i = 0; i < m + n; i++) {
      cout << 1 << ' ';
      if (i == n - 1) cout << endl;
    }
    return 0;
  }
  for (int i = 0; i < m + n; i++) pre[i] = i;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mp[i][j] == '=') {
        join(i, j + n);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (found(i) == found(j + n) && mp[i][j] != '=') {
        cout << "No";
        return 0;
      }
      int fx = found(i), fy = found(j + n);
      if (mp[i][j] == '>') {
        addarc(fy, fx);
      }
      if (mp[i][j] == '<') {
        addarc(fx, fy);
      }
    }
  }
  int i;
  for (i = 0; i < m + n; i++) {
    if (in[i] == 0 && g[i].size()) {
      topo(i);
    }
  }
  for (int i = 0; i < m + n; i++) {
    if (in[i] != 0) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < m + n; i++) {
    if (ans[i] == 0) {
      ans[i] = ans[found(i)];
    }
    cout << ans[i] << ' ';
    if (i == n - 1) cout << endl;
  }
  return 0;
}
