#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> gr(n + 1);
  vector<set<int>> clo(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    gr[b].push_back(a);
  }
  int k;
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; i++) {
    cin >> path[i];
  }
  deque<int> dq;
  dq.push_back(path[k - 1]);
  vector<bool> vis(n + 1, false);
  vis[path[k - 1]] = true;
  while (dq.size() > 0) {
    int sz = dq.size();
    vector<pair<int, int>> pushed;
    for (int i = 0; i < sz; i++) {
      int tp = dq.front();
      dq.pop_front();
      for (auto v : gr[tp]) {
        if (vis[v] == false) {
          pushed.push_back({v, tp});
        }
      }
    }
    for (int i = 0; i < pushed.size(); i++) {
      if (vis[pushed[i].first] == false) {
        dq.push_back(pushed[i].first);
      }
      vis[pushed[i].first] = true;
      clo[pushed[i].first].insert(pushed[i].second);
    }
  }
  int mini = 1;
  for (int i = 1; i < k - 1; i++) {
    if (clo[path[i - 1]].find(path[i]) != clo[path[i - 1]].end()) {
      continue;
    } else {
      mini++;
    }
  }
  int maxi = 1;
  for (int i = 1; i < k - 1; i++) {
    if (clo[path[i - 1]].size() == 1 &&
        clo[path[i - 1]].find(path[i]) != clo[path[i - 1]].end()) {
      continue;
    } else {
      maxi++;
    }
  }
  cout << (mini - 1) << " " << (maxi - 1) << endl;
  return 0;
}
