#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int dis[N];
vector<int> adj[N], jda[N];
int p[N];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    jda[y].push_back(x);
  }
  int k;
  cin >> k;
  for (int i = 0; i < k; i++) cin >> p[i];
  queue<int> q;
  memset(dis, 31, sizeof dis);
  dis[p[k - 1]] = 0;
  q.push(p[k - 1]);
  while (q.size()) {
    int x = q.front();
    q.pop();
    for (auto u : jda[x]) {
      if (dis[u] > dis[x] + 1) {
        dis[u] = dis[x] + 1;
        q.push(u);
      }
    }
  }
  int mn = 0, mx = 0;
  for (int i = 0; i < k - 1; i++) {
    if (dis[p[i + 1]] != dis[p[i]] - 1) {
      mn++;
      mx++;
    } else {
      bool f = 0;
      for (auto u : adj[p[i]])
        if (dis[u] == dis[p[i]] - 1 && u != p[i + 1]) f = 1;
      mx += f;
    }
  }
  cout << mn << ' ' << mx << endl;
}
