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:
#include <bits/stdc++.h>
using namespace std;

#define for_(i,a,b) for(int i=a;i<b;++i)
#define for_rev(i,a,b) for(int i=a;i>=b;--i)
#define allof(a) a.begin(),a.end()
#define minit(a,b) memset(a,b,sizeof(a))
#define size_of(a) (int)a.size()

typedef long long lint;
typedef pair<int, int> pii;
typedef double Double;

inline int POPCNT(int _x) { return __builtin_popcount(_x); }
inline int POPCNT(lint _x) { return __builtin_popcountll(_x); }

const int iINF = 1L << 30;
const lint lINF = 1LL << 60;
const Double EPS = 1e-9;

typedef int flow_type;

struct DN_Edge {
	int to; flow_type cost; int rev; bool flag, rev_f; int id;
	DN_Edge(int _to, flow_type _cost, int _rev,
			bool _flag, bool _rev_f, int _id = -1) : to(_to), cost(_cost),
									 rev(_rev), flag(_flag), rev_f(_rev_f), id(_id) {}
};

struct Dinic {
	int V;
	vector< vector< DN_Edge > > edges;
	vector< int > level, iter;
	
	Dinic(int _n) : V(_n), edges(_n, vector< DN_Edge >()), level(_n, -1), iter(_n, 0) {}
	
	void add_edge(int _f, int _t, flow_type _c, bool flag, int id) {
		edges[_f].push_back(DN_Edge(_t, _c, size_of(edges[_t]), flag, false, id));
		edges[_t].push_back(DN_Edge(_f, flow_type(), size_of(edges[_f]) - 1, flag, true));
	}
	
	void bfs(int _s) {
		fill(allof(level), -1);
		queue<int> q; q.push(_s);
		level[_s] = 0;
		
		while (!q.empty()) {
			int v = q.front(); q.pop();
			int e_size = size_of(edges[v]);
			
			for_(i,0,e_size) {
				DN_Edge e = edges[v][i];
				if (e.cost > 0 && level[e.to] < 0) {
					level[e.to] = level[v] + 1;
					q.push(e.to);
				}
			}
		}
	}
	
	flow_type dfs(int _v, int _t, flow_type _f) {
		if (_v == _t) return _f;
		int e_size = size_of(edges[_v]);
		
		for (int &i = iter[_v]; i < e_size; ++i) {
			DN_Edge &e = edges[_v][i];
			
			if (e.cost > 0 && level[_v] < level[e.to]) {
				flow_type d = dfs(e.to, _t, min(_f, e.cost));
				if (d > 0) {
					e.cost -= d;
					edges[e.to][e.rev].cost += d;
					return d;
				}
			}
		}
		
		return -1;
	}
	
	flow_type max_flow(int _s, int _t) {
		flow_type flow = flow_type();
		while (1) {
			bfs(_s);
			if (level[_t] < 0) return flow;
			fill(allof(iter), 0);
			flow_type f;
			while ((f = dfs(_s, _t, iINF)) > 0) {
				flow += f;
			}
		}
	}
	
	pair<int, vector< int > > rev_cnt() {
		int resi = 0;
		vector< int > resv;
		
		for_(v,0,V) {
			int e_size = size_of(edges[v]);
			
			for_(i,0,e_size) {
				DN_Edge e = edges[v][i];
				
				if (!e.rev_f && e.flag && e.cost == 0) {
				//cout << "Edge(" << v << "," << e.to << "," << e.cost << "," << e.rev << "," 
				//	<< ( (e.flag) ? "rev" : "no_rev") << ")" << endl;
					resi++;
					resv.push_back(e.id);
				}
			}
		}
		
		return make_pair(resi, resv);
	}
};

int N, M;
int X[1010], Y[1010];
int S, T;

void solve() {
	Dinic dinic(N);
	for_(i,0,M) {
		dinic.add_edge(X[i] - 1, Y[i] - 1, 1, false, -1);
		dinic.add_edge(Y[i] - 1, X[i] - 1, 1, true, i + 1);
	}
	
	cout << dinic.max_flow(S - 1, T - 1) << endl;
	pair<int, vector< int > > piv = dinic.rev_cnt();
	
	cout << piv.first << endl;
	vector< int > ansv = piv.second;
	for_(i,0,size_of(ansv)) cout << ansv[i] << endl;
}

int main() {
	cin >> N >> M;
	for_(i,0,M) cin >> X[i] >> Y[i];
	cin >> S >> T;
	solve();
	return 0;
}