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<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<deque>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<string>
#include<sstream>
#include<ctime>
#define eps 1e-9
#define ALL(x) x.begin(),x.end()
#define INS(x) inserter(x,x.begin())
#define rep(i,j,k) for(int i=j;i<=k;i++)
#define MAXN 10005
#define MAXM 40005
#define INF 0x3fffffff
#define PB push_back
#define MP make_pair
#define X first
#define Y second
#define lc (k<<1)
#define rc ((k<<1)|1)
#define mii ((l+r)>>1)
#define fk puts("fuck!")
#define clr(x,y) memset(x,y,sizeof(x))
using namespace std;
typedef long long LL;
int i,j,k,n,m,x,y,T,mx,mi,cas,num,len;
bool flag;


const int inf = 0x3f3f3f3f;
struct edgenode
{
    int from,to,next,flag;
    int cap;
}edge[MAXM];
int Edge,head[MAXN],ps[MAXN],dep[MAXN];

void add_edge(int x,int y,int c,int flag)
{
    edge[Edge].from=x;
    edge[Edge].to=y;
    edge[Edge].cap=c;
    edge[Edge].flag=flag;
    edge[Edge].next=head[x];
    head[x]=Edge++;

    edge[Edge].from=y;
    edge[Edge].to=x;
    edge[Edge].cap=0;
    edge[Edge].flag=flag;
    edge[Edge].next=head[y];
    head[y]=Edge++;
}

int dinic(int n,int s,int t)
{
    int tr,flow=0;
    int i,j,k,l,r,top;
    while(1){
        memset(dep,-1,(n+1)*sizeof(int));
        for(l=dep[ps[0]=s]=0,r=1;l!=r;)//BFS部分，将?定?分?
        {
            for(i=ps[l++],j=head[i];j!=-1;j=edge[j].next)
            {
                if (edge[j].cap&&-1==dep[k=edge[j].to])
                {
                    dep[k]=dep[i]+1;ps[r++]=k;
                    if(k==t)
                    {
                        l=r;
                        break;
                    }
                }
            }
        }
        if(dep[t]==-1)break;

        for(i=s,top=0;;)//DFS部分
        {
            if(i==t)//当前点就是?点?
            {
                for(k=0,tr=inf;k<top;++k)
                    if(edge[ps[k]].cap<tr)tr=edge[ps[l=k]].cap;

                for(k=0;k<top;++k)
                    edge[ps[k]].cap-=tr,edge[ps[k]^1].cap+=tr;

                flow+=tr;
                i=edge[ps[top=l]].from;
            }

            for(j=head[i];j!=-1;j=edge[j].next)//找当前点所指向的点
                if(edge[j].cap&&dep[i]+1==dep[edge[j].to]) break;

            if(j!=-1)
            {
                ps[top++]=j;//当前点有所指向的点，把?个点加入?中
                i=edge[j].to;
            }
            else
            {
                if (!top) break;//当前点没有指向的点，回溯
                dep[i]=-1;
                i=edge[ps[--top]].from;
            }
        }
    }
    return flow;
}

vector<int> ans;
int main()
{
    memset(head,-1,sizeof(head));
    Edge=0;
	scanf("%d%d",&n,&m);
    for (i=1;i<=m;i++)
    {
        scanf("%d%d",&x,&y);
        add_edge(x,y,1,1);
        add_edge(y,x,1,0);
    }
    int S,T;
    scanf("%d%d",&S,&T);
    printf("%d\n",dinic(n+3,S,T));

    ans.clear();
    for (i=0;i<Edge;i+=2)
    {
        if (edge[i].flag==0 && edge[i].cap==0)
        {
            ans.PB(i/4+1);
        }
    }
    printf("%d\n",ans.size());
    for (i=0;i<ans.size();i++)
    {
        printf("%d\n",ans[i]);
    }
	return 0;
}