#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <cstring>
#include <algorithm>
using namespace std;



const int MAX_V = 5000;
const int INF = 1<<29;

struct Edge {
    int rev, from, to, cap, icap;
    Edge(int r, int f, int t, int c) : rev(r), from(f), to(t), cap(c), icap(c) {}
};

struct Graph {
    int V;
    vector<Edge> list[MAX_V];
    
    Graph(int n = 0) : V(n) {for (int i = 0; i < MAX_V; ++i) list[i].clear();}
    void init(int n = 0) {V = n; for (int i = 0; i < MAX_V; ++i) list[i].clear();}
	void resize(int n = 0) {V = n;}
    void reset() {for (int i = 0; i < V; ++i) for (int j = 0; j < list[i].size(); ++j) list[i][j].cap = list[i][j].icap;}
    inline vector<Edge>& operator [] (int i) {return list[i];}
    
    Edge &redge(Edge e) {
        if (e.from != e.to) return list[e.to][e.rev];
        else return list[e.to][e.rev+1];
    }
    
    void addedge(int from, int to, int cap) {
        list[from].push_back(Edge(list[to].size(), from, to, cap));
        list[to].push_back(Edge(list[from].size()-1, to, from, 0));
    }
};

Graph G;


int level[MAX_V];
int iter[MAX_V];

void dibfs(Graph &G, int s) {
    memset(level, -1, sizeof(level));
    level[s] = 0;
    queue<int> que;
    que.push(s);
    while (!que.empty()) {
        int v = que.front();
        que.pop();
        for (int i = 0; i < G[v].size(); ++i) {
            Edge &e = G[v][i];
            if (level[e.to] < 0 && e.cap > 0) {
                level[e.to] = level[v] + 1;
                que.push(e.to);
            }
        }
    }
}

int didfs(Graph &G, int v, int t, int f) {
    if (v == t) return f;
    for(int &i = iter[v]; i < G[v].size(); ++i) {
        Edge &e = G[v][i], &re = G.redge(e);
        if (level[v] < level[e.to] && e.cap > 0) {
            int d = didfs(G, e.to, t, min(f, e.cap));
            if (d > 0) {
                e.cap -= d;
                re.cap += d;
                return d;
            }
        }
    }
    return 0;
}

int Dinic(Graph &G, int s, int t) {
    int res = 0;
    while (true) {
        dibfs(G, s);
        if (level[t] < 0) return res;
        memset(iter, 0, sizeof(iter));
        int flow;
        while ((flow = didfs(G, s, t, INF)) > 0) {
            res += flow;
        }
    }
}



int n, m, a, b, s, t;
bool sreach[MAX_V], treach[MAX_V];

void sdfs(Graph &G, int v) {
    sreach[v] = true;
    for (int i = 0; i < G[v].size(); ++i) 
        if (G[v][i].cap == 1 && !sreach[G[v][i].to]) 
            sdfs(G, G[v][i].to);
}

void tdfs(Graph &G, int v) {
    treach[v] = true;
    for (int i = 0; i < G[v].size(); ++i) 
        if (G[v][i].cap == 0 && !treach[G[v][i].to]) 
            tdfs(G, G[v][i].to);
}

int main() {
    while (cin >> n >> m >> s >> t) {
        if (n == 0) break;
        
        G.init(n);
        for (int i = 0; i < m; ++i) {
            cin >> a >> b;
            --a; --b;
            G.addedge(a, b, 1);
        }
        --s; --t;
        
        int res = Dinic(G, s, t);
        int num = 0;
        
        memset(sreach, 0, sizeof(sreach)); sdfs(G, s);
        memset(treach, 0, sizeof(treach)); tdfs(G, t);
        
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < G[i].size(); ++j) {
                int from = i, to = G[i][j].to;
                if (G[i][j].cap == 1 && G[i][j].icap == 1 && treach[from] && sreach[to]) {
                    ++num;
                }
            }
        }
        
        if (num > 0) ++res;
        cout << res << " " << num << endl;
    }
    
    return 0;
}


Measured memory_bytes: 2060