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<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define INF 2000000000
#define typec int//type of cost
const int pN=500,eN=10000;
struct Edge{
	int u,v,next;
	typec w;
};
Edge edge[eN];
int en,head[pN],cur[pN],ps[pN],dep[pN];
void insert(int u,int v){
	edge[en].u=u;
	edge[en].v=v;
	edge[en].w=1;
	edge[en].next=head[u];
	head[u]=en++;
	edge[en].u=v;
	edge[en].v=u;
	edge[en].w=1;//æåä¸º0ï¼æ åä¸ºc
	edge[en].next=head[v];
	head[v]=en++;
}
typec max_flow(int n,int s,int t){
	typec tr,res=0;
	int i,j,k,f,r,top;
	while(1){
		memset(dep,-1,n*sizeof(int));
		for(f=dep[ps[0]=s]=0,r=1;f!=r;)
			for(i=ps[f++],j=head[i];j!=-1;j=edge[j].next){
				if(edge[j].w&&-1==dep[k=edge[j].v]){
					dep[k]=dep[i]+1;
					ps[r++]=k;
					if(k==t){
						f=r;
						break;
					}
				}
			}
			if(-1==dep[t])break;
			memcpy(cur,head,n*sizeof(int));
			for(i=s,top=0;;){
				if(i==t){
					for(k=0,tr=INF;k<top;++k)
						if(edge[ps[k]].w<tr)
							tr=edge[ps[f=k]].w;
						for(k=0;k<top;++k)
							edge[ps[k]].w-=tr,edge[ps[k]^1].w+=tr;
						res+=tr;
						i=edge[ps[top=f]].u;
				}
				for(j=cur[i];cur[i]!=-1;j=cur[i]=edge[cur[i]].next)
					if(edge[j].w&&dep[i]+1==dep[edge[j].v])break;
					if(cur[i]!=-1){
						ps[top++]=cur[i];
						i=edge[cur[i]].v;
					}else{
						if(0==top)break;
						dep[i]=-1;
						i=edge[ps[--top]].u;
					}
			}
	}
	return res;
}
int N,M,S,E;
void get_data(){
	int i;
	scanf("%d%d",&N,&M);
	memset(head,-1,sizeof(head));en=0;
	int u,v;
	for(i=0;i<M;i++){
		scanf("%d%d",&u,&v);
		u--;v--;
		insert(u,v);
	}
	scanf("%d%d",&S,&E);
	S--;E--;
}
void run(){
	int flow=max_flow(N,S,E);
	int cnt=0,i,res[1000];
	for(i=0;i<en;i+=2){
		if(edge[i].w==2)res[cnt++]=i/2+1;
	}
	printf("%d\n%d\n",flow,cnt);
	for(i=0;i<cnt;i++)printf("%d\n",res[i]);
}
int main(){
	get_data();
	run();
	return 0;
}