#include <bits/stdc++.h>
using namespace std;
void parent(vector<vector<int> > &G, vector<int> &P, int n) {
  for (int i = 0; i < G[n].size(); i++) {
    if (P[G[n][i]] || G[n][i] == 1) {
      continue;
    }
    P[G[n][i]] = n;
    parent(G, P, G[n][i]);
  }
}
int dfs(vector<vector<int> > &G, vector<int> &Init, vector<int> &Goal,
        vector<int> &V, int n, vector<int> &F, vector<int> &P) {
  int init = Init[n];
  if (F[P[P[n]]] == 1) {
    init = 1 - init;
    F[n] = (F[n] + 1) % 2;
  }
  int f = (init != Goal[n]);
  V[n] += f;
  if (V[n] == 2) {
    F[n] = (F[n] + 1) % 2;
  }
  if (G[n].size() == 1) {
    return f;
  }
  int sum = 0;
  for (int i = 0; i < G[n].size(); i++) {
    if (V[G[n][i]]) {
      continue;
    }
    V[G[n][i]] = 1;
    sum += dfs(G, Init, Goal, V, G[n][i], F, P);
  }
  return sum + f;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<vector<int> > G(n + 1);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
  }
  G[1].push_back(0);
  vector<int> Init(n + 1), Goal(n + 1);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &Init[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &Goal[i]);
  }
  vector<int> V(n + 1), P(n + 1), F(n + 1);
  V[1] = 1;
  P[1] = 0;
  P[0] = -1;
  parent(G, P, 1);
  P[0] = 0;
  printf("%d\n", dfs(G, Init, Goal, V, 1, F, P));
  for (int i = 1; i <= n; i++) {
    if (V[i] == 2) {
      printf("%d\n", i);
    }
  }
}
