#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> dg, og;
vector<bool> vist;
vector<int> dist;
void bfs(int begin) {
  vist[begin] = true;
  dist[begin] = 0;
  queue<int> pq;
  pq.push(begin);
  while (!pq.empty()) {
    int a = pq.front();
    pq.pop();
    for (int i = 0; i < dg[a].size(); i++) {
      if (!vist[dg[a][i]]) {
        vist[dg[a][i]] = true;
        dist[dg[a][i]] = dist[a] + 1;
        pq.push(dg[a][i]);
      }
    }
  }
}
int distcounter(int a) {
  int count = 0;
  for (int i = 0; i < og[a].size(); i++) {
    if (dist[og[a][i]] == dist[a] - 1) count++;
  }
  return count;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  dg.resize(n + 1);
  dist.resize(n + 1);
  og.resize(n + 1);
  vist.assign(n + 1, false);
  int u, v;
  for (int i = 1; i <= m; i++) {
    cin >> u >> v;
    og[u].push_back(v);
    dg[v].push_back(u);
  }
  int k;
  cin >> k;
  vector<int> p;
  p.resize(k + 1);
  for (int i = 1; i <= k; i++) cin >> p[i];
  bfs(p[k]);
  int small = 0, large = 0;
  for (int i = 1; i < k; i++) {
    int count = distcounter(p[i]);
    if (dist[p[i + 1]] != dist[p[i]] - 1) {
      small++;
      large++;
    } else {
      if (count > 1) {
        large++;
      }
    }
  }
  cout << small << " " << large << endl;
}
