#include <bits/stdc++.h>
using namespace std;
long long n, a, b;
long long cnt;
long long d[100010];
long long mark[100010];
vector<long long> nei[100010];
long long fs[100010];
long long ss[100010];
set<long long> se;
long long gp, ch;
void dfs(long long n) {
  mark[n] = 1;
  for (int i = 0; i < nei[n].size(); i++) {
    if (mark[nei[n][i]] != 1) {
      d[nei[n][i]] = n;
      dfs(nei[n][i]);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> a;
    a--;
    cin >> b;
    b--;
    nei[a].push_back(b);
    nei[b].push_back(a);
  }
  dfs(0);
  for (int i = 0; i < n; i++) {
    cin >> fs[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> ss[i];
  }
  for (int i = 0; i < n; i++) {
    if (i == 0 || d[i] == 0) {
      if (fs[i] != ss[i]) {
        se.insert(i + 1);
      }
    } else {
      gp = d[d[i]];
      if (fs[gp] != ss[gp]) {
        ch = 1;
      } else {
        ch = 0;
      }
      if (abs(fs[i] - ss[i]) != ch) {
        se.insert(i + 1);
      }
    }
  }
  cout << se.size() << endl;
  while (!se.empty()) {
    cout << *se.begin() << endl;
    se.erase(se.begin());
  }
}
