#include <bits/stdc++.h>
using namespace std;
int const N = 3e5 + 2, oo = 1e9;
long long const OO = 2e18;
double const eps = 1e-8, PI = acos(-1);
int mod = oo + 7;
string aa[1001];
int lar[2][1001], eq[2][1001], er[2][1001], val[2][1001];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int now = 1;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> aa[i];
    for (int j = 0; j < m; j++) {
      lar[0][i] += aa[i][j] == '<';
      eq[0][i] += aa[i][j] == '=';
      lar[1][j] += aa[i][j] == '>';
      eq[1][j] += aa[i][j] == '=';
    }
  }
  int rn = n, rm = m;
  while (rn || rm) {
    vector<pair<int, int> > ssm[2];
    int cnt = 0;
    for (int i = 0; i < n; i++)
      if (!er[0][i] && lar[0][i] + eq[0][i] == rm)
        ssm[0].push_back({lar[0][i], i});
    for (int i = 0; i < m; i++)
      if (!er[1][i] && lar[1][i] + eq[1][i] == rn)
        ssm[1].push_back({lar[1][i], i});
    sort(ssm[0].begin(), ssm[0].end(), greater<pair<int, int> >());
    sort(ssm[1].begin(), ssm[1].end(), greater<pair<int, int> >());
    for (int i = 0; i < ssm[0].size(); i++) {
      if (i && ssm[0][i].first != ssm[0][i - 1].first) break;
      int v = ssm[0][i].second;
      er[0][v] = 1;
      val[0][v] = now;
      cnt++;
      rn--;
    }
    for (int i = 0; i < ssm[1].size(); i++) {
      if (i && ssm[1][i].first != ssm[1][i - 1].first) break;
      int v = ssm[1][i].second;
      er[1][v] = 1;
      val[1][v] = now;
      cnt++;
      rm--;
    }
    now++;
    if (!cnt) break;
  }
  if (rn || rm) {
    cout << "No\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (aa[i][j] == '>') {
        if (val[0][i] > val[1][j]) continue;
        cout << "No\n";
        return 0;
      } else if (aa[i][j] == '<') {
        if (val[0][i] < val[1][j]) continue;
        cout << "No\n";
        return 0;
      } else {
        if (val[0][i] == val[1][j]) continue;
        cout << "No\n";
        return 0;
      }
      assert(val[1][j] > 0);
    }
    assert(val[0][i] > 0);
  }
  cout << "Yes\n";
  for (int i = 0; i < n; i++) cout << val[0][i] << ' ';
  cout << '\n';
  for (int i = 0; i < m; i++) cout << val[1][i] << ' ';
  cout << '\n';
  return 0;
}
