Problem: ICP city has an express company whose trucks run from the crossing S to the crossing T. The president of the company is feeling upset because all the roads in the city are one-way, and are severely congested. So, he planned to improve the maximum flow (edge disjoint paths) from the crossing S to the crossing T by reversing the traffic direction on some of the roads.

Your task is writing a program to calculate the maximized flow from S to T by reversing some roads, and the list of the reversed roads.



Input

The first line of a data set contains two integers N (2 \leq N \leq 300) and M (0 \leq M \leq {\rm min} (1\,000,\ N(N-1)/2)). N is the number of crossings in the city and M is the number of roads.

The following M lines describe one-way roads in the city. The i-th line (1-based) contains two integers X_i and Y_i (1 \leq X_i, Y_i \leq N, X_i \neq Y_i). X_i is the ID number (1-based) of the starting point of the i-th road and Y_i is that of the terminal point. The last line contains two integers S and T (1 \leq S, T \leq N, S \neq T, 1-based).

The capacity of each road is 1. You can assume that i \neq j implies either X_i \neq X_j or Y_i \neq Y_j, and either X_i \neq Y_j or X_j \neq Y_i.

Output

In the first line, print the maximized flow by reversing some roads. In the second line, print the number R of the reversed roads. In each of the following R lines, print the ID number (1-based) of a reversed road. You may not print the same ID number more than once.

If there are multiple answers which would give us the same flow capacity, you can print any of them.

Examples

Input

2 1
2 1
2 1


Output

1
0


Input

2 1
1 2
2 1


Output

1
1
1


Input

3 3
3 2
1 2
3 1
1 3


Output

2
2
1
3

Solution (in CPP):

Solution:
/* **********************************************

    File Name: main.cpp

    Auther: zhengdongjian@tju.edu.cn

    Created Time: 2015/8/26 ????????? ?????? 2:12:40

*********************************************** */
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int INF = 0xfffffff;
const int MAX = 307;
const int MAX_M = MAX * MAX << 1;

struct Edge {
	int to;
	int cap;
	int id;
	int nxt;
	int bakup;
	void set(int _to, int _cap, int _id, int _nxt) {
		to = _to;
		cap = _cap;
		id = _id;
		nxt = _nxt;
	}
} G[MAX_M];
int Q[MAX << 1];
int head[MAX], tot;
int level[MAX];
int iter[MAX];
int n, m, s, t;

inline void add_edge(int u, int v, int c, int id) {
	G[tot].set(v, c, id, head[u]);
	G[tot].bakup = c;
	head[u] = tot++;
	G[tot].set(u, c, -id, head[v]);
	G[tot].bakup = 0;
	head[v] = tot++;
}

bool bfs() {
	int le = 0, ri = 0;
	Q[ri++] = s;
	memset(level, -1, sizeof(level));
	level[s] = 0;
	while (le < ri) {
		int p = Q[le++];
		if (p == t) {
			return true;
		}

		for (int i = head[p]; ~i; i = G[i].nxt) {
			//puts("flag1");
			Edge& e = G[i];
			if (level[e.to] == -1 && e.cap > 0) {
				level[e.to] = level[p] + 1;
				Q[ri++] = G[i].to;
				//printf("push %d, level = %d\n", G[i].to, level[e.to]);
			}
		}
	}
	return false;
}

int dfs(int s, int t, int flow) {
	if (s == t) return flow;
	int sum = 0, tp;
	for (int& i = iter[s]; ~i; i = G[i].nxt) {
		Edge& e = G[i];
		if (e.cap > 0 && level[e.to] == level[s] + 1) {
			tp = dfs(e.to, t, min(flow, e.cap));
			flow -= tp;
			e.cap -= tp;
			G[i ^ 1].cap += tp;
			sum += tp;
			if (flow == 0) {
				break;
			}
		}
	}
	return sum;
}

int dinic() {
	int sum = 0;
	while (bfs()) {
		memcpy(iter, head, sizeof(int) * (n + 1));
		int tp;
		while ((tp = dfs(s, t, INF)) > 0) {
			sum += tp;
		}
	}
	return sum;
}

int main() {
	while (cin >> n >> m) {
		memset(head, -1, sizeof(int) * (n + 1));
		tot = 0;
		int u, v;
		for (int i = 0; i < m; ++i) {
			cin >> u >> v;
			add_edge(u, v, 1, i + 1);
		}
		/*
		for (int i = 1; i <= n; ++i) {
			printf("%d:", i);
			for (int j = head[i]; ~j; j = G[j].nxt) {
				printf(" %d", G[j].to);
			}
			puts("");
		}
		*/
		cin >> s >> t;
		int maxflow = dinic();
		cout << maxflow << endl;
		set<int> st;
		for (int i = 1; i <= n; ++i) {
			for (int j = head[i]; ~j; j = G[j].nxt) {
				Edge& e = G[j];
				if (e.bakup > 0) {
					if (e.cap > e.bakup) {
						st.insert(e.id);
					}
				}
			}
		}
		cout << st.size() << endl;
		for (set<int>::iterator it = st.begin(); it != st.end(); ++it) {
			cout << *it << endl;
		}
	}
	return 0;
}