#include <bits/stdc++.h>
using namespace std;
const long double epsylon = 1e-9;
const std::string PROGRAM_NAME = "ivo";
int st[200010], sz;
int main() {
  int n;
  cin >> n;
  char buf[2];
  vector<int> moves(2 * n, 0);
  for (int i = 0; i < 2 * n; ++i) {
    scanf("%s", buf);
    if (buf[0] == '-') {
      int temp;
      scanf("%d", &temp);
      moves[i] = -temp;
    }
  }
  sz = 0;
  bool good = true;
  for (int i = 0; i < 2 * n && good; ++i) {
    if (moves[i] == 0) {
      st[sz++] = i;
    } else {
      if (sz == 0) {
        good = false;
        break;
      }
      moves[st[sz - 1]] = -moves[i];
      sz--;
    }
  }
  if (good) {
    priority_queue<int> pq;
    for (int i = 0; i < (int)moves.size() && good; i++) {
      if (moves[i] > 0) {
        pq.push(-moves[i]);
      } else {
        int t = pq.top();
        pq.pop();
        if (t != moves[i]) {
          good = false;
          break;
        }
      }
    }
  }
  if (good) {
    vector<int> a;
    for (int i = 0; i < (int)moves.size(); ++i) {
      if (moves[i] > 0) {
        a.push_back(moves[i]);
      }
    }
    cout << "YES" << endl;
    for (int i = 0; i < (int)a.size(); ++i) {
      printf("%d%c", a[i], ((i + 1) != a.size() ? ' ' : '\n'));
    }
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
