n = int(input())
data = sorted([int(input()) for i in range(n)])
k = (n >> 1) + (n & 1)
il, ir = 0, 1
while n > k:
    try:
        if data[il]*2 <= data[ir]:
            il += 1
            n -= 1
        ir += 1
    except:
        break
print(n)


n = int(input())
data = sorted([int(raw_input()) for i in range(n)])
k = (n >> 1) + (n & 1)
il, ir = 0, 1
while n > k:
    try:
        if data[il]*2 <= data[ir]:
            il += 1
            n -= 1
        ir += 1
    except:
        break
print(n)


n = int(raw_input())
a = []

for i in range(n):
    a.append(int(raw_input()))

a.sort()

j = (n+1)/2

i = 0
c = 0

while i < n/2 and j < n:
    if a[i]*2 <= a[j]:
        c += 1
        i+=1
        j+=1
    else:
        j+=1

print n - c


n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()
i=0
j=n/2
while(i<n/2 and j<n):
	if(a[i]*2<=a[j]):
		i+=1
	j+=1
print n-i


n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()
j=n-1
ans=0
i=n-2
ins=0
out=0
while(i>=0):
	if(a[j]!=-1):
		if(a[i]*2<=a[j]):
			out+=1
			ins+=1
			a[i]=-1
			j-=1
	else:
		j-=1
	i-=1
x=n-ins
print x


n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()
j=n-1
ans=0
i=n/2-1
ins=0
out=0
while(i>=0):
	if(a[j]!=-1):
		if(a[i]*2<=a[j]):
			out+=1
			ins+=1
			a[i]=-1
			j-=1
	else:
		j-=1
	i-=1
x=n-ins
print x


n=int(input())
a=[]
for i in range(n):
	a.append(int(input()))
a.sort()
j=n-1
ans=0
i=n/2
ins=0
out=0
while(i>=0):
	if(a[j]!=-1):
		if(a[i]*2<=a[j]):
			out+=1
			ins+=1
			a[i]=-1
			j-=1
	else:
		j-=1
	i-=1
x=n-ins
print x


n = int(raw_input())
n2 = n/2
sz = []
for i in range(n):
    sz.append(int(raw_input()))
s = sorted(sz)
l = 0
r = n2
while l < n2 and r < n:
    if s[l]*2 <= s[r]:
        l += 1
    r += 1
print n - l


n = input()

arr = []
ap = arr.append
for i in xrange(n):
    ap(int(raw_input()))

arr.sort()

i1 = len(arr)/2
if len(arr) % 2 == 0:
    i1 -= 1

i2 = len(arr) - 1
final = i1
count = len(arr)
while i1 >= 0 and i2 > final:
    if arr[i2] >= 2 * arr[i1]:
        count -= 1
        i2 -= 1
    i1 -= 1

print count


import sys

n = input()

arr = n * [0]

for i in xrange(n):
    arr[i] = input()

arr.sort()

#str 1
first = 0
count = len(arr)

i = 1

while i < len(arr) and 2 * arr[first] > arr[i]:
    i += 1

final = i
while i < len(arr) and first < final:
    if arr[i] >= 2 * arr[first]:
        first += 1
        count -= 1
    i += 1

#str 2
last = len(arr) - 1
count2 = len(arr)

i = len(arr) - 2

while i >= 0 and arr[last] < 2 * arr[i]:
    i -= 1

final = i
while i >= 0 and last > final:
    if arr[last] >= 2 * arr[i]:
        last -= 1
        count2 -= 1
    i -= 1

print min(count, count2)


import sys

n = input()

arr = n * [0]

for i in xrange(n):
    arr[i] = input()

arr.sort()

i1 = len(arr)/2
if len(arr) % 2 == 0:
    i1 -= 1

i2 = len(arr) - 1
final = i1
count = len(arr)
while i1 >= 0 and i2 > final:
    if arr[i2] >= 2 * arr[i1]:
        count -= 1
        i2 -= 1
    i1 -= 1

print count


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=x
bl=n-x
while 1:
    if chk==0:
        break
    chk=0
    if bl==0:
        break
    mb=max(b)
    while bk<bl:
        if a[0]*2>mb:
            break
        if a[0]*2<=b[bk]:
            b.pop(bk)
            chk=1
            ans-=1
            bl-=1
            break
        bk+=1
print ans


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
for i in xrange(len(a)):
    if chk==0:
        break
    chk=0
    for j in xrange(len(b)):
        if a[i]*2<=b[j]:
            b.pop(j)
            chk=1
            ans-=1
            break
print ans


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
p=0
for i in xrange(len(a)):
    if chk==0:
        break
    chk=0
    for j in xrange(p,len(b)):
        if a[i]*2>max(b):
            break
        if a[i]*2<=b[j]:
            b.pop(j)
            chk=1
            ans-=1
            p=j
            break
print ans


n=input()
l=[]
for i in range(n):
    l.append(int(raw_input()))
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=x
bl=n-x
while 1:
    if chk==0:
        break
    chk=0
    if bl==0:
        break
    mb=max(b)
    while bk<bl:
        if a[0]*2>mb:
            break
        if a[0]*2<=b[bk]:
            a.pop(0)
            b.pop(bk)
            chk=1
            ans-=1
            bl-=1
            break
        bk+=1
print ans


n=input()
ans=chk=0
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
while 1:
    chk=len(l)
    for i in range(-2,-chk-1,-1):
        if l[i]*2<=l[-1]:
            l.pop(i)
            l.pop(-1)
            ans-=1
            break
    if chk==len(l):
        break
print ans


n=input()
l=[]
for i in range(n):
    l.append(int(raw_input()))
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=x
bl=n-x
while 1:
    if chk==0:
        break
    chk=0
    if bl==0:
        break
    mb=max(b)
    while bk<bl:
        if a[ak]*2>mb:
            break
        if a[ak]*2<=b[bk]:
            a.pop(0)
#            b.pop(bk)
            chk=1
            ans-=1
#            bl-=1
            break
        bk+=1
print ans


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=len(a)
bl=len(b)
while ak<al:
    if chk==0:
        break
    chk=0
    while bk<bl:
        if a[ak]*2>max(b):
            break
        if a[ak]*2<=b[bk]:
            b.pop(bk)
            chk=1
            ans-=1
            ak+=1
            break
        bk+=1
print ans


#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import io
import re
import math

def solve(data):
    data = sorted(data)
    sets = 0

    p = data[:len(data) / 2]
    n = data[len(data) / 2:]

    pi = len(p) - 1
    ni = len(n) - 1
    while pi >= 0:
        while n[ni] < p[pi] * 2:
            pi -= 1
            if pi < 0:
                break

        if ni < 0 or pi < 0:
            break

        sets += 1
        ni -= 1
        pi -= 1

    print len(data) - sets

if __name__ == "__main__":
    num = int(raw_input())
    data = []
    for x in range(num):
        data.append(int(raw_input()))
    solve(data)


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=x
bl=n-x
while 1:
    if chk==0:
        break
    chk=0
    if bl==0:
        break
    mb=max(b)
    while bk<bl:
        if a[0]*2>mb:
            break
        if a[0]*2<=b[bk]:
            a.pop(0)
            b.pop(bk)
            chk=1
            ans-=1
            bl-=1
            break
        bk+=1
print ans


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
ak=bk=p=0
al=x
bl=n-x
while ak<al:
    if chk==0:
        break
    chk=0
    mb=max(b)
    while bk<bl:
        if a[ak]*2>mb:
            break
        if a[ak]*2<=b[bk]:
            b.pop(bk)
            chk=1
            ans-=1
            ak+=1
            break
        bk+=1
print ans


n=input()
l=[]
for i in range(n):
    l.append(input())
l.sort()
ans=n
x=n/2
a=l[:x]
b=l[x:]
chk=1
p=0
for i in xrange(len(a)):
    if chk==0:
        break
    chk=0
    for j in xrange(p,len(b)):
        if a[i]*2<=b[j]:
            b.pop(j)
            chk=1
            ans-=1
            p=j
            break
print ans


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class XX {

	static TreeMap<Point, Integer> map;
	static TreeMap<Integer, Integer> map2;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = false;
		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) == a)
				x = true;

		}

		if(map2.containsKey(b) && map.containsKey(new Point(b, a))){
			return map2.get(b) - map.get(new Point(b, a)) + (x ? 1 : 0);
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
//		System.out.println(">>> "+(a + 1) + " " + (b + 1) + " " + ans);

		if(!map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
//			System.out.println("---" + (b + 1) + " " + (t + v));
			map2.put(b, t + v);
		}

		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		map2 = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static TreeMap<Point, Integer> map;
	static TreeMap<Integer, Integer> map2;
	static TreeSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2.get(b) - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(!map2.containsKey(a)){
				map2.put(a, tt + t);
			}

			return ans;
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(!map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2.put(b, t + v);
		}

		if(!map2.containsKey(a) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(!map2.containsKey(a))
				map2.put(a, t + v);
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		set = new TreeSet<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		map2 = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = in.length - 1; i >= 0; i--) {
			for (int j = 0; j < in[i].size(); j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static HashMap<Integer, Integer> map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2.get(b) - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(!map2.containsKey(a)){
				map2.put(a, tt + t);
			}

			return ans;
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(!map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2.put(b, t + v);
		}

		if(!map2.containsKey(a) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(!map2.containsKey(a))
				map2.put(a, t + v);
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
//		map = new TreeMap<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		set = new TreeSet<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		map2 = new TreeMap<>();
		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new HashMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = in.length - 1; i >= 0; i--) {
			for (int j = 0; j < in[i].size(); j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class D {

	static TreeMap<Point, Integer> map;
	static TreeMap<Integer, Integer> map2;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a)))
			return map2.get(b) - map.get(new Point(b, a));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);

		if(!map2.containsKey(b) && map.containsKey(new Point(b, a)))
			map2.put(b, ans + map.get(new Point(b, a)));

		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = 200000;

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		map2 = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = i;
			int b = 200000 - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static int[] map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2[b] != -1 && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2[b] - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(map2[a] == -1){
				map2[a] = tt + t;
			}

			return ans;
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(map2[b] == -1 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2[b] = t + v;
		}

		if(map2[a] == -14 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(map2[a] == -1)
				map2[a] = t + v;
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
//		map = new TreeMap<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		set = new TreeSet<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		map2 = new TreeMap<>();
		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new int[n];
		Arrays.fill(map2, -1);

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = in.length - 1; i >= 0; i--) {
			for (int j = 0; j < in[i].size(); j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		for (int i = 0; i < ans.length; i++) {
			if(map2[i] != -1){
				ans[i]= map2[i];
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class D {

	static TreeMap<Point, Integer> map;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);

		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class D {

	static TreeMap<Point, Integer> map;
	static TreeMap<Integer, Integer> map2;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a)))
			return map2.get(b) - map.get(new Point(b, a));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);

		if(!map2.containsKey(b) && map.containsKey(new Point(b, a)))
			map2.put(b, ans + map.get(new Point(b, a)));

		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		map2 = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static int[] map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2[b] != -1 && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2[b] - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(map2[a] == -1){
				map2[a] = tt + t;
			}

			return ans;
		}
		int ans = 0;
		int s = in[b].size();
		for (int i = 0; i < s; i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		s = outt[b].size();
		for (int i = 0; i < s; i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(map2[b] == -1 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2[b] = t + v;
		}

		if(map2[a] == -1 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(map2[a] == -1)
				map2[a] = t + v;
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];

		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new int[n];
		Arrays.fill(map2, -1);

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < n; i++) {
			int s = in[i].size();
			for (int j = 0; j < s; j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		for (int i = 0; i < n; i++) {
			if(map2[i] != -1){
				ans[i]= map2[i];
				continue;
			}
			int s = outt[i].size();
			for (int j = 0; j < s; j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			s = in[i].size();
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static HashMap<Integer, Integer> map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2.get(b) - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(!map2.containsKey(a)){
				map2.put(a, tt + t);
			}

			return ans;
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(!map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2.put(b, t + v);
		}

		if(!map2.containsKey(a) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(!map2.containsKey(a))
				map2.put(a, t + v);
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
//		map = new TreeMap<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		set = new TreeSet<>(new Comparator<Point>() {
//
//			@Override
//			public int compare(Point o1, Point o2) {
//				if(o1.x == o2.x)
//					return o1.y - o2.y;
//				return o1.x - o2.x;
//			}
//		});
//
//		map2 = new TreeMap<>();
		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new HashMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

//		for (int i = in.length - 1; i >= 0; i--) {
//			for (int j = 0; j < in[i].size(); j++) {
//				solve(i, in[i].get(j));
//				solve(in[i].get(j), i);
//			}
//		}

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static TreeMap<Point, Integer> map;
	static TreeMap<Integer, Integer> map2;
	static TreeSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2.containsKey(b) && map.containsKey(new Point(b, a))){
			return map2.get(b) - map.get(new Point(b, a)) + (x ? 1 : 0);
		}
		int ans = 0;
		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(!map2.containsKey(b) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2.put(b, t + v);
		}

		if(!map2.containsKey(a) && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(!map2.containsKey(a))
				map2.put(a, t + v);
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		set = new TreeSet<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		map2 = new TreeMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = in.length - 1; i >= 0; i--) {
			for (int j = 0; j < in[i].size(); j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		for (int i = 0; i < ans.length; i++) {
			if(map2.containsKey(i)){
				ans[i]= map2.get(i);
				continue;
			}
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
				solve(outt[i].get(j), i);
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class D {

	static HashMap<Point, Integer> map;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new HashMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class D {

	static TreeMap<Point, Integer> map;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);

		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new TreeMap<>(new Comparator<Point>() {

			@Override
			public int compare(Point o1, Point o2) {
				if(o1.x == o2.x)
					return o1.y - o2.y;
				return o1.x - o2.x;
			}
		});

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static int[] map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){
		Point p1 = new Point(a, b);

		if(map.containsKey(p1))
			return map.get(p1);
		Point p2 = new Point(b, a);
		boolean x = set.contains(p2);

		if(map2[b] != -1 && map.containsKey(p2)){
			int t = map.get(p2);
			int ans = map2[b] - t + (x ? 1 : 0);
			map.put(p1, ans);
			int tt = ans;
			if(!x) tt--;
			if(map2[a] == -1){
				map2[a] = tt + t;
			}

			return ans;
		}
		int ans = 0;
		int s = in[b].size();
		for (int i = 0; i < s; i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		s = outt[b].size();
		for (int i = 0; i < s; i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);

		if(map2[b] == -1 && map.containsKey(p2)){
			int v = map.get(p2);
			int t = ans;
			if(x) t--;
			map2[b] = t + v;
		}

		if(map2[a] == -1 && map.containsKey(p2)){
			int v = map.get(p2);
			int t = ans;
			if(!x) t--;
			if(map2[a] == -1)
				map2[a] = t + v;
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];

		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new int[n];
		Arrays.fill(map2, -1);

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

		for (int i = 0; i < n; i++) {
			int s = in[i].size();
			for (int j = 0; j < s; j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(map2[i] < min)
				min = map2[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(map2[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class XX {

	static HashMap<Point, Integer> map;
	static int[] map2;
	static HashSet<Point> set;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));

		boolean x = set.contains(new Point(b, a));

		if(map2[b] != -1 && map.containsKey(new Point(b, a))){
			int t = map.get(new Point(b, a));
			int ans = map2[b] - t + (x ? 1 : 0);
			map.put(new Point(a, b), ans);
			int tt = ans;
			if(!x) tt--;
			if(map2[a] == -1){
				map2[a] = tt + t;
			}

			return ans;
		}
		int ans = 0;
		int s = in[b].size();
		for (int i = 0; i < s; i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		s = outt[b].size();
		for (int i = 0; i < s; i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else{
				ans++;
			}
		}

		map.put(new Point(a, b), ans);
		if(map2[b] == -1 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(x) t--;
			map2[b] = t + v;
		}

		if(map2[a] == -1 && map.containsKey(new Point(b, a))){
			int v = map.get(new Point(b, a));
			int t = ans;
			if(!x) t--;
			if(map2[a] == -1)
				map2[a] = t + v;
		}
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];

		map = new HashMap<>();
		set = new HashSet<>();
		map2 = new int[n];
		Arrays.fill(map2, -1);

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));

			in[b].add(a);
			outt[a].add(b);
		}

//		int[] ans = new int[n];

		for (int i = 0; i < n; i++) {
			int s = in[i].size();
			for (int j = 0; j < s; j++) {
				solve(i, in[i].get(j));
				solve(in[i].get(j), i);
			}
		}

//		for (int i = 0; i < n; i++) {
//			if(map2[i] != -1){
//				ans[i]= map2[i];
//				continue;
//			}
//
//			System.out.println("hi");
//			int s = outt[i].size();
//			for (int j = 0; j < s; j++) {
//				ans[i] += solve(i, outt[i].get(j));
//				solve(outt[i].get(j), i);
//			}
//			s = in[i].size();
//			for (int j = 0; j < in[i].size(); j++) {
//				ans[i] += solve(i, in[i].get(j));
//				solve(in[i].get(j), i);
//			}
//		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(map2[i] < min)
				min = map2[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(map2[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;

public class XX {

	static HashSet<Point> set;
	static ArrayList<Integer>[] graph;
	static ArrayList<Integer>[] tree;
	static int[] neg;
	static int[] pos;
	static int totalNeg;

	static void buildTree(int parent, int root, int n, int p){
		neg[root] = n;
		pos[root] = p;

		if(graph[root].size() == 1 && parent != -1)
			return;

		for (int i = 0; i < graph[root].size(); i++) {
			int cur = graph[root].get(i);
			if(cur == parent)
				continue;
			if(set.contains(new Point(root, cur)))
				buildTree(root, cur, n, p + 1);
			else{
				totalNeg ++;
				buildTree(root, cur, n + 1, p);
			}
		}
	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();
		set = new HashSet<>();
		graph = new ArrayList[n];
		tree = new ArrayList[n];
		neg = new int[n];
		pos = new int[n];
		totalNeg = 0;

		for (int i = 0; i < n; i++) {
			graph[i] = new ArrayList<>();
		}
		for (int i = 0; i < n; i++) {
			tree[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			set.add(new Point(a, b));
			graph[a].add(b);
			graph[b].add(a);
		}

		buildTree(-1, 0, 0, 0);

		int[] ans = new int[n];
		int min = n - 1;

		for (int i = 0; i < n; i++) {
			ans[i] = totalNeg - neg[i] + pos[i];
			min = Math.min(min, ans[i]);
		}

		out.println(min);
		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


package kammola;

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class D {

	static HashMap<Point, Integer> map;
	static ArrayList<Integer>[] outt, in;

	static int solve(int a, int b){

		if(map.containsKey(new Point(a, b)))
			return map.get(new Point(a, b));
		int ans = 0;

		for (int i = 0; i < in[b].size(); i++) {
			if(in[b].get(i) != a)
				ans += solve(b, in[b].get(i));
		}

		for (int i = 0; i < outt[b].size(); i++) {
			if(outt[b].get(i) != a)
				ans += solve(b, outt[b].get(i));
			else
				ans++;
		}

		map.put(new Point(a, b), ans);
		return ans;

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		in = new ArrayList[n];
		outt = new ArrayList[n];
		map = new HashMap<>();

		for (int i = 0; i < n; i++) {
			in[i] = new ArrayList<>();
			outt[i] = new ArrayList<>();
		}

		for (int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;

			in[b].add(a);
			outt[a].add(b);
		}

		int[] ans = new int[n];

		for (int i = 0; i < ans.length; i++) {
			for (int j = 0; j < outt[i].size(); j++) {
				ans[i] += solve(i, outt[i].get(j));
			}
			for (int j = 0; j < in[i].size(); j++) {
				ans[i] += solve(i, in[i].get(j));
			}
		}

		int min = n;

		for (int i = 0; i < n; i++) {
			if(ans[i] < min)
				min = ans[i];
		}

		out.println(min);

		for (int i = 0; i < n; i++) {
			if(ans[i] == min)
				out.print(i + 1 + " ");
		}
		out.println();

		out.flush();
		out.close();
	}

	static class Scanner
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


import java.io.*;
import java.util.*;
import java.lang.*;
import java.util.HashMap;
public class templ implements Runnable {
    class pair
    {
        int v,val;
        pair(int f,int s)
        {
            v=f;
            val=s;
        }
    }
    public static ArrayList<pair> g[]=new ArrayList[1000000];
    public static int vis[]=new int[1000000];
    public static int dist[]=new int[1000000];
    public static int a[]=new int[1000000];
    public static int x=0;
    void dfs(int v,int p)
    {
        vis[v]=1;
        for(int i=0;i<g[v].size();i++)
        {
            int u=g[v].get(i).v;
            if(vis[u]==0)
            {
                int k=g[v].get(i).val;
                dist[u]=dist[v]+1;
                a[u]=a[v];
                if(k==0)
                {
                    x++;
                    a[u]=1+a[u];
                }
                dfs(u,v);
            }
        }
    }
    int binarySearch(int arr[], int l, int r, int x)
    {
        if (r >= l)
        {
            int mid = l + (r - l)/2;
            if (arr[mid] == x)
                return mid;
            if (arr[mid] > x)
                return binarySearch(arr, l, mid-1, x);
            return binarySearch(arr, mid+1, r, x);
        }
        return -1;
    }
    void merge1(int arr[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i]<=R[j])
            {
                arr[k] = L[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }
    void sort1(int arr[], int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort1(arr, l, m);
            sort1(arr , m+1, r);
            merge1(arr, l, m, r);
        }
    }
    void merge3(int arr[],int arr1[],int arr2[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        int L1[]=new int[n1];
        int R1[]=new int[n2];
        int L2[]=new int[n1];
        int R2[]=new int[n2];
        //long L3[]=new long[n1];
        //long R3[]=new long[n2];
        for (int i=0; i<n1; ++i)
        {
            L[i] = arr[l + i];
            L1[i]=arr1[l+i];
            L2[i]=arr2[l+i];
            //L3[i]=arr3[l+i];
        }
        for (int j=0; j<n2; ++j)
        {
            R[j] = arr[m + 1+ j];
            R1[j]=arr1[m+1+j];
            R2[j]=arr2[m+1+j];
            //R3[j]=arr3[m+1+j];
        }
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                arr1[k]=L1[i];
                arr2[k]=L2[i];
                //arr3[k]=L3[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                arr1[k]=R1[j];
                arr2[k]=R2[j];
                //arr3[k]=R3[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            arr1[k]=L1[i];
            arr2[k]=L2[i];
            //arr3[k]=L3[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            arr1[k]=R1[j];
            arr2[k]=R2[j];
            //arr3[k]=R3[j];
            j++;
            k++;
        }
    }
    void sort3(int arr[],int arr1[],int arr2[], int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort3(arr,arr1,arr2, l, m);
            sort3(arr ,arr1,arr2, m+1, r);
            merge3(arr,arr1,arr2,l, m, r);
        }
    }
    void merge2(int arr[],int arr1[],int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        int L1[]=new int[n1];
        int R1[]=new int[n2];
        for (int i=0; i<n1; ++i)
        {
            L[i] = arr[l + i];
            L1[i]=arr1[l+i];
        }
        for (int j=0; j<n2; ++j)
        {
            R[j] = arr[m + 1+ j];
            R1[j]=arr1[m+1+j];
        }
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                arr1[k]=L1[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                arr1[k]=R1[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            arr1[k]=L1[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            arr1[k]=R1[j];
            j++;
            k++;
        }
    }
    void sort2(int arr[],int arr1[],int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort2(arr,arr1, l, m);
            sort2(arr ,arr1, m+1, r);
            merge2(arr,arr1,l, m, r);
        }
    }
    void merge4(int arr[],int arr1[],int arr2[],int arr3[], int l, int m, int r)
    {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int [n1];
        int R[] = new int [n2];
        int L1[]=new int[n1];
        int R1[]=new int[n2];
        int L2[]=new int[n1];
        int R2[]=new int[n2];
        int L3[]=new int[n1];
        int R3[]=new int[n2];
        for (int i=0; i<n1; ++i)
        {
            L[i] = arr[l + i];
            L1[i]=arr1[l+i];
            L2[i]=arr2[l+i];
            L3[i]=arr3[l+i];
        }
        for (int j=0; j<n2; ++j)
        {
            R[j] = arr[m + 1+ j];
            R1[j]=arr1[m+1+j];
            R2[j]=arr2[m+1+j];
            R3[j]=arr3[m+1+j];
        }
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = L[i];
                arr1[k]=L1[i];
                arr2[k]=L2[i];
                arr3[k]=L3[i];
                i++;
            }
            else
            {
                arr[k] = R[j];
                arr1[k]=R1[j];
                arr2[k]=R2[j];
                arr3[k]=R3[j];
                j++;
            }
            k++;
        }
        while (i < n1)
        {
            arr[k] = L[i];
            arr1[k]=L1[i];
            arr2[k]=L2[i];
            arr3[k]=L3[i];
            i++;
            k++;
        }
        while (j < n2)
        {
            arr[k] = R[j];
            arr1[k]=R1[j];
            arr2[k]=R2[j];
            arr3[k]=R3[j];
            j++;
            k++;
        }
    }
    void sort4(int arr[],int arr1[],int arr2[],int arr3[], int l, int r)
    {
        if (l < r)
        {
            int m = (l+r)/2;
            sort4(arr,arr1,arr2,arr3, l, m);
            sort4(arr ,arr1,arr2,arr3, m+1, r);
            merge4(arr,arr1,arr2,arr3,l, m, r);
        }
    }
    public int justsmall(int a[],int l,int r,int x)
    {
        int p=-1;
        while(l<=r)
        {
            int mid=(l+r)/2;
            if(a[mid]<=x)
            {
                p=mid;
                l=mid+1;
            }
            else
                r=mid-1;
        }
        return p;
    }
    public int justlarge(int a[],int l,int r,int x)
    {
        int p=0;
        while(l<=r)
        {
            int mid=(l+r)/2;
            if(a[mid]<=x)
            {
                l=mid+1;
            }
            else
            {
                p=a[mid];
                r = mid - 1;
            }
        }
        return p;
    }
    long gcd(long x,long y)
    {
        if(x%y==0)
            return y;
        else
            return(gcd(y,x%y));
    }
    long fact(long n)
    {
        long ans=1;
        for(int i=1;i<=n;i++)
            ans*=i;
        return ans;
    }
    public static void main(String args[])throws Exception
    {
        new Thread(null,new templ(),"templ",1<<26).start();
    }
    public void run() {
        try
        {
            InputReader in = new InputReader(System.in);
            PrintWriter out = new PrintWriter(System.out);
            int n=in.ni();
            for(int i=1;i<=n;i++)
            {
                g[i]=new ArrayList();
            }
            for(int i=1;i<n;i++)
            {
                int u=in.ni();
                int v=in.ni();
                g[u].add(new pair(v,1));
                g[v].add(new pair(u,0));
            }
            dist[1]=a[1]=0;
            dfs(1,-1);
            int m[]=new int[n];
            int p[]=new int[n];
            int o=0;
            for(int i=1;i<=n;i++)
            {
                p[o]=i;
                m[o]=x-2*a[i]+dist[i];
                o++;
            }
            sort2(m,p,0,o-1);
            int ans=1;
            int an[]=new int[n];
            an[0]=p[0];
            for(int i=1;i<o;i++)
            {
                if(m[i]==m[i-1])
                {
                    an[ans]=p[i];
                    ans++;
                }
                else
                     break;
            }
            out.println(m[0]);
            sort1(an,0,ans-1);
            for(int i=0;i<ans;i++)
                out.print(an[i]+" ");
            out.close();
        }
        catch(Exception e){
            return;
        }
    }
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

    }
}