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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int INF = 1e9;

struct EdgeEx{
  int to, cap, rev;
  EdgeEx(int to_=0, int cap_ = 0, int rev_ = 0)
	:to(to_), cap(cap_), rev(rev_){}
};


// Ford-Fulkerson
// O(FE) where F := max flow of graph
vector< vector<EdgeEx> > G; // (V, E)
vector<bool> used; // sizeof V

// add edge with (from -> to, capacity)
void add_edge(int from, int to, int cap){
  G[from].push_back(EdgeEx(to, cap, G[to].size()));
  G[to].push_back(EdgeEx(from, 0, G[from].size()-1));
}

// find increase path
int max_flow_dfs(int v, int t, int f){
  if(v == t) return f;
  used[v] = true;
  for(int i=0;i<G[v].size();++i){
	EdgeEx& e = G[v][i];
	if(!used[e.to] && e.cap > 0){
	  int d = max_flow_dfs(e.to, t, min(f, e.cap));
	  if(d > 0){
		e.cap -= d;
		G[e.to][e.rev].cap += d;
		return d;
	  }
	}
  }
  return 0;
}

int max_flow(int s, int t){
  const int V = G.size();
  int flow = 0;
  used.assign(V, false);
  while(true){
	fill(used.begin(), used.end(), false);
	int f = max_flow_dfs(s, t, INF);
	if(f == 0) return flow;
	flow += f;
  }
}


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N, M; cin >> N >> M;
  G.assign(N, vector<EdgeEx>());
  vector<PII> es(M);
  int tab[310][310];
  fill((int*)tab, (int*)tab+310*310, 0);
  REP(i,M){
	int a, b; cin >> a >> b;
	--a, --b;
	es[i].first = a, es[i].second = b;
	add_edge(a, b, 1);
	tab[a][b] = i+1;
	add_edge(b, a, 1);
	tab[b][a] = -i-1;
  }
  int S, T; cin >> S >> T;
  --S, --T;
  int ans = max_flow(S,T);
  VI xs;
  REP(i,N){
	REP(j, SZ(G[i])){
	  int to = G[i][j].to;
	  if(G[i][j].cap == 0 && tab[i][to] < 0)
		xs.PB(-tab[i][to]);
	}
  }

  SORT(xs);
  xs.erase(unique(ALL(xs)), xs.end());
  cout << ans << endl << SZ(xs) << endl;
  for(int x: xs) cout << x << endl;
  
  return 0;
}