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 <string.h>
#include <stdio.h>
#include <algorithm>
#include <queue>
#include <vector>
#define V 13100
#define E 1000100 
#define inf 0x3f3f3f3f
using namespace std;
int vis[V];
int dist[V];
int pre[V];
int ans1,ans2;
int n,m;
struct Edge{
    int u,v,cap,flow,cost,next,id;
}edge[E];
int head[V],cnt;

void init(){
    cnt=0;ans1=ans2=0;
    memset(head,-1,sizeof(head));
}
void addedge(int u,int v,int c,int cost,int id)
{
    edge[cnt].u=u;edge[cnt].v=v;edge[cnt].cost=cost;edge[cnt].id=id;
    edge[cnt].cap=c;edge[cnt].flow=0;edge[cnt].next=head[u];head[u]=cnt++;
    

    edge[cnt].u=v;edge[cnt].v=u;edge[cnt].cost=-cost;edge[cnt].id=id;
    edge[cnt].cap=0;edge[cnt].flow=0;edge[cnt].next=head[v];head[v]=cnt++;
}

bool spfa(int begin,int end){
    int u,v;
    queue<int> q;
    for(int i=0;i<=n;i++){
        pre[i]=-1;
        vis[i]=0;
        dist[i]=inf;
    }
    vis[begin]=1;
    dist[begin]=0;
    q.push(begin);
    while(!q.empty()){
        u=q.front();
        q.pop();
        vis[u]=0;
        for(int i=head[u];i!=-1;i=edge[i].next){
            //if(edge[i].c>0){
                v=edge[i].v;
                if(edge[i].cap>edge[i].flow && dist[v]>dist[u]+edge[i].cost){
                    dist[v]=dist[u]+edge[i].cost;
                    pre[v]=i;
                    if(!vis[v]){
                        vis[v]=true;
                        q.push(v);
                    }
                }
            }
    }
    if(pre[end] == -1) return false;
    else return true;
}

void MCMF(int begin,int end){
    int ans=0,flow;
    int flow_sum=0;
    while(spfa(begin,end)){
        flow=inf;
        for(int i=pre[end];i!=-1;i=pre[edge[i^1].v])
            if(flow>edge[i].cap-edge[i].flow)
                flow=edge[i].cap-edge[i].flow;
        for(int i=pre[end];i!=-1;i=pre[edge[i^1].v]){
            edge[i].flow+=flow;
            edge[i^1].flow-=flow;
            ans2 += edge[i].cost*flow;
        }
        ans1 += flow;
    }
}

int main()
{
   // freopen("in.txt","r",stdin);
    int a,b,c;
    int s,t;
    while(scanf("%d %d",&n,&m)!=EOF){
        init();
		for(int i=1;i<=m;i++){
            scanf("%d %d",&a,&b);
            addedge(a,b,1,0,i);
            addedge(b,a,1,1,i);
        }
        scanf("%d %d",&s,&t);
        MCMF(s,t);
        printf("%d\n%d\n",ans1,ans2);
        vector<int>v;
		for (int i=1;i<=n;i++)
		    for (int j=head[i];j!=-1;j=edge[j].next)
		    	if (edge[j].flow==1 && edge[j].cost){
		    		v.push_back(edge[j].id);
				} 

		for (int i=0;i<v.size();i++)
			printf("%d\n",v[i]);
    }
    return 0;
}