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 <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
#define residue(s,t) (capacity[s][t]-flow[s][t])
int main(){
  int N, M;
  while(cin>>N>>M && N){
    int capacity[300][300] = {};
    int flow[300][300] = {};
    int X[1000], Y[1000];
    REP(i, M){
      cin>>X[i]>>Y[i];
      X[i]--; Y[i]--;
      capacity[X[i]][Y[i]]++;
      capacity[Y[i]][X[i]]++;
    }
    int S, T;
    cin>>S>>T;
    S--; T--;
    int total = 0;
    while(true){
      queue<int> que;
      int prev[300]; memset(prev, -1, sizeof(prev));
      que.push(S); prev[S] = S;
      while(!que.empty() && prev[T] < 0){
        int u = que.front(); que.pop();
        REP(v, N) if(prev[v] < 0 && residue(u, v) > 0){
          prev[v] = u;
          que.push(v);
        }
      }
      if(prev[T] < 0) break;
      int inc = M;
      for(int u = T; prev[u] != u; u = prev[u]){
        inc = min(inc, residue(prev[u], u));
      }
      for(int u = T; prev[u] != u; u = prev[u]){
        flow[prev[u]][u] += inc;
        flow[u][prev[u]] -= inc;
      }
      total += inc;
    }
    vector<int> rev_road;
    REP(i, M){
      if(flow[X[i]][Y[i]] > 0){
        flow[X[i]][Y[i]]--;
      }else if(flow[Y[i]][X[i]] > 0){
        flow[Y[i]][X[i]]--;
        rev_road.push_back(i + 1);
      }
    }
    cout<<total<<endl;
    cout<<rev_road.size()<<endl;
    REP(i, rev_road.size()) cout<<rev_road[i]<<endl;
  }
  return 0;
}