#include <bits/stdc++.h>
using namespace std;
namespace {
void SolveA() {
  cin.sync_with_stdio(false);
  long long a[6];
  for (auto& v : a) {
    cin >> v;
  }
  size_t n;
  cin >> n;
  vector<long long> b(n);
  for (auto& v : b) {
    cin >> v;
  }
  make_heap(a, a + 6);
  sort_heap(a, a + 6);
  make_heap(b.begin(), b.end());
  sort_heap(b.begin(), b.end());
  long long res = 1000000000;
  for (size_t i = 0; i < n; ++i) {
    for (size_t j = 0; j < 6; ++j) {
      size_t startPos[6] = {0};
      bool ok = true;
      long long loBound = b[i] - a[j];
      for (size_t k = 0; k < 6; ++k) {
        size_t lb = 0, rb = n - 1;
        while (lb < rb) {
          size_t m = (lb + rb) / 2;
          if (b[m] - a[k] < loBound) {
            lb = m + 1;
          } else {
            rb = m;
          }
        }
        startPos[k] = (b[lb] - a[k] >= loBound ? lb : n);
      }
      long long curMax = 0;
      for (size_t k = 0; k < 6; ++k) {
        if (startPos[k] == n || (k < 5 && startPos[k] == startPos[k + 1])) {
          continue;
        }
        size_t iLast = (k == 5) ? (n - 1) : (startPos[k + 1] - 1);
        curMax = max(curMax, b[iLast] - a[k] - loBound);
      }
      if (startPos[0] == 0) {
        res = min(res, curMax);
      }
    }
  }
  cout << res;
}
void SolveB() {
  size_t n;
  {
    string tmp;
    getline(cin, tmp);
    stringstream ss(tmp);
    ss >> n;
  }
  vector<int> commands(2 * n);
  for (auto& v : commands) {
    {
      string tmp;
      getline(cin, tmp);
      if (tmp[0] == '+') {
        v = -1;
      } else {
        tmp[0] = ' ';
        stringstream ss(tmp);
        ss >> v;
      }
    }
  }
  vector<int> res;
  reverse(commands.begin(), commands.end());
  set<int> curValues;
  for (const auto& v : commands) {
    if (v == -1) {
      if (curValues.empty()) {
        cout << "NO";
        return;
      } else {
        auto it = curValues.begin();
        res.push_back(*it);
        curValues.erase(it);
      }
    } else {
      if (!curValues.empty()) {
        auto it = curValues.begin();
        if (v > *it) {
          cout << "NO";
          return;
        }
      }
      curValues.insert(v);
    }
  }
  reverse(res.begin(), res.end());
  cout << "YES\n";
  for (const auto& v : res) {
    cout << v << " ";
  }
}
void SolveC() {}
}  // namespace
int main() {
  SolveB();
  return 0;
}
