#include <bits/stdc++.h>
using namespace std;
int gcd(int A, int B) {
  if (!B) return A;
  return gcd(B, A % B);
}
int n, m, v, u, p = 1e9;
vector<int> adj[200003], adj2[200003];
int d[200003];
int k[200003];
bool visit[200003];
queue<int> q;
void bfs(int v) {
  q.push(v);
  visit[v] = 1;
  while (!q.empty()) {
    int s = q.front();
    q.pop();
    for (int x : adj[s]) {
      if (visit[x]) continue;
      visit[x] = 1;
      q.push(x);
      d[x] = d[s] + 1;
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> v >> u;
    adj[u].push_back(v);
    adj2[v].push_back(u);
  }
  cin >> v;
  for (int i = 0; i < v; i++) cin >> k[i];
  bfs(k[v - 1]);
  int mn = 0, mx = 0;
  for (int i = 0; i < v - 1; i++) {
    if (d[k[i]] != d[k[i + 1]] + 1) {
      mn++;
      mx++;
    } else {
      for (int x : adj2[k[i]]) {
        if (d[x] == d[k[i + 1]] && x != k[i + 1]) {
          mx++;
          break;
        }
      }
    }
  }
  cout << endl;
  cout << mn << " " << mx << endl;
}
