#include <bits/stdc++.h>
const int size = 100001;
void solve(int n) {
  int l, r, i, m = 0, cc, j, k, x, num[size], res = 0, c[size], cur[size],
               ncur[size];
  std::vector<std::vector<int>> v(n);
  for (i = 0; i < n - 1; i++) {
    scanf("%d%d", &j, &k);
    v[j - 1].push_back(k - 1);
    v[k - 1].push_back(j - 1);
  }
  for (i = 0; i < n; i++) scanf("%d", &num[i]);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    num[i] ^= x;
  }
  for (i = 0; i < n; i++) {
    cur[i] = -1;
    ncur[i] = 0;
  }
  l = 0;
  r = 0, c[0] = 0;
  cur[0] = num[0];
  ncur[0] = 0;
  while (l <= r) {
    for (i = 0; i < v[c[l]].size(); i++)
      if (cur[v[c[l]][i]] == -1) {
        r++;
        c[r] = v[c[l]][i];
        num[c[r]] ^= ncur[c[l]];
        cur[c[r]] = num[c[r]] ^ ncur[c[l]];
        ncur[c[r]] = cur[c[l]];
      }
    l++;
  }
  for (i = 0; i < n; i++)
    if (num[i] == 1) res++;
  printf("%d\n", res);
  for (i = 0; i < n; i++)
    if (num[i] == 1) printf("%d\n", i + 1);
}
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    solve(n);
  }
  return 0;
}
