#include <bits/stdc++.h>
using namespace std;
long long int INF = 1000000000;
vector<vector<int> > v;
int* dist;
void bfs(int ver, int n) {
  bool vis[n];
  for (int i = 0; i < n; i++) vis[i] = false;
  vis[ver] = true;
  queue<pair<int, int> > q;
  q.push(make_pair(ver, 0));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    int a = p.first, b = p.second;
    dist[a] = b;
    for (int i = 0; i < v[a].size(); i++) {
      if (vis[v[a][i]] == false) {
        vis[v[a][i]] = true;
        q.push(make_pair(v[a][i], b + 1));
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, m;
  cin >> n >> m;
  vector<vector<int> > vt(n);
  v = vt;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x -= 1;
    y -= 1;
    v[y].push_back(x);
    vt[x].push_back(y);
  }
  int k;
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    x -= 1;
    path[i] = x;
  }
  dist = new int[n];
  bfs(path[k - 1], n);
  vector<pair<int, int> > pos(k, make_pair(0, 0));
  for (int i = 1; i < k; i++) {
    int ver = path[i - 1], pver = path[i];
    vector<pair<int, int> > t;
    for (int j = 0; j < vt[ver].size(); j++)
      t.push_back(make_pair(dist[vt[ver][j]], vt[ver][j]));
    int md = t[0].first;
    for (int j = 1; j < t.size(); j++) md = min(md, t[j].first);
    for (int j = 0; j < t.size(); j++) {
      if (t[j].first == md and t[j].second == pver) pos[i].first = 1;
      if (t[j].first == md and t[j].second != pver) pos[i].second = 1;
    }
  }
  int mans = 0, Mans = 0;
  for (int i = 1; i < k; i++) {
    if (pos[i].first != 1) mans += 1;
    if (pos[i].second == 1) Mans += 1;
  }
  cout << mans << " " << Mans << endl;
}
