#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
const double PI = 3.1415926535897932;
const double EPS = 1e-10;
const int INF = 0x3f3f3f3f;
const int maxn = 1e3 + 100;
const int hashmaxn = 8388608;
int lowbit(int x) { return x & (-x); }
int root[maxn << 1];
char ch[maxn][maxn];
vector<int> edge[maxn << 1];
int answer[maxn << 1];
int du[maxn << 1];
int n, m, sum;
int findroot(int i) {
  return i == root[i] ? root[i] : root[i] = findroot(root[i]);
}
void megeroot(int i, int j) {
  int x = findroot(i);
  int y = findroot(j + n);
  if (x != y) {
    root[x] = y;
    sum++;
  }
}
void toolsort() {
  queue<int> q;
  for (long long int i = 1; i < n + m + 1; i++) {
    if (du[i] == 0 && root[i] == i) {
      sum++;
      answer[i] = 1;
      q.push(i);
    }
  }
  while (!q.empty()) {
    int a = q.front();
    q.pop();
    for (int i = 0; i < edge[a].size(); i++) {
      du[edge[a][i]]--;
      if (du[edge[a][i]] == 0) {
        sum++;
        answer[edge[a][i]] = answer[a] + 1;
        q.push(edge[a][i]);
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (long long int i = 1; i < n + m + 1; i++) root[i] = i;
  for (long long int i = 1; i < n + 1; i++) {
    for (long long int j = 1; j < m + 1; j++) {
      cin >> ch[i][j];
      if (ch[i][j] == '=') {
        megeroot(i, j);
      }
    }
  }
  for (long long int i = 1; i < n + 1; i++)
    for (long long int j = 1; j < m + 1; j++) {
      if (ch[i][j] == '=') continue;
      int x = findroot(i), y = findroot(j + n);
      if (ch[i][j] == '<') {
        edge[x].push_back(y);
        du[y]++;
      } else {
        edge[y].push_back(x);
        du[x]++;
      }
    }
  toolsort();
  if (sum != n + m)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    for (long long int i = 1; i < n + 1; i++)
      cout << answer[findroot(i)] << " ";
    cout << endl;
    for (long long int i = n + 1; i < n + m + 1; i++) {
      if (i != n + m)
        cout << answer[findroot(i)] << " ";
      else
        cout << answer[findroot(i)];
    }
    cout << endl;
  }
  return 0;
}
