#include <bits/stdc++.h>
using namespace std;
void bfs(long long int s, vector<vector<long long int> > &adjT,
         vector<long long int> &vis, vector<long long int> &dist) {
  vis[s] = 1;
  queue<long long int> q;
  q.push(s);
  while (!q.empty()) {
    long long int cur = q.front();
    q.pop();
    for (long long int neigh : adjT[cur]) {
      if (vis[neigh] == 0) {
        dist[neigh] = dist[cur] + 1;
        vis[neigh] = 1;
        q.push(neigh);
      }
    }
  }
}
int main() {
  long long int n, m;
  cin >> n >> m;
  vector<vector<long long int> > adj(n, vector<long long int>(0)),
      adjT(n, vector<long long int>(0));
  for (long long int i = 0; i < (m); i++) {
    long long int a, b;
    cin >> a >> b;
    a--;
    b--;
    adj[a].push_back(b);
    adjT[b].push_back(a);
  }
  long long int k;
  cin >> k;
  vector<long long int> path(k);
  for (long long int i = 0; i < (k); i++) {
    cin >> path[i];
    path[i]--;
  }
  vector<long long int> vis(n, 0), dist(n, 0);
  bfs(*path.rbegin(), adjT, vis, dist);
  long long int minchange = 0, maxchange = 0;
  for (long long int i = 0; i < (k - 1); i++) {
    long long int mind = INT_MAX;
    long long int countmind = 0;
    for (long long int neigh : adj[path[i]]) {
      if (dist[neigh] < mind) {
        mind = dist[neigh];
        countmind = 1;
      } else if (dist[neigh] == mind) {
        countmind++;
      }
    }
    if (dist[path[i + 1]] == mind && countmind > 1) {
      maxchange++;
    } else if (dist[path[i + 1]] > mind) {
      minchange++;
      maxchange++;
    }
  }
  cout << minchange << " " << maxchange << endl;
}
