#include <bits/stdc++.h>
using namespace std;
void replace_all(string &str, string &from, string &to) {
  long start_pos = 0;
  while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
    str.replace(start_pos, from.length(), to);
    start_pos += to.length();
  }
}
class Solution {};
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<vector<int> > inters(n);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    inters[v].push_back(u);
  }
  int k;
  cin >> k;
  int maxbuilds = 0, minbuilds = 0;
  vector<int> polypath(k);
  for (int i = 0; i < k; i++) {
    cin >> polypath[i];
    polypath[i]--;
  }
  int dest = polypath.back();
  vector<pair<int, int> > vlabels(n, make_pair(2147483647, 0));
  queue<pair<int, int> > q;
  q.push({dest, 0});
  vector<bool> visited(n, false);
  vlabels[dest].first = 0;
  vlabels[dest].second = 0;
  while (q.size()) {
    pair<int, int> curr = q.front();
    q.pop();
    if (!visited[curr.first]) {
      for (int x = 0; x < inters[curr.first].size(); x++) {
        int neighbor = inters[curr.first][x];
        int depth = curr.second + 1;
        if (depth <= vlabels[neighbor].first) {
          vlabels[neighbor].first = depth;
          vlabels[neighbor].second++;
        }
        pair<int, int> next = {neighbor, depth};
        q.push(next);
      }
      visited[curr.first] = true;
    }
  }
  int prev_depth = vlabels[polypath[0]].first;
  int prev_v = polypath[0];
  for (int i = 1; i < k; i++) {
    int curr_depth = vlabels[polypath[i]].first;
    if (curr_depth < prev_depth) {
      if (vlabels[prev_v].second > 1) {
        ++maxbuilds;
      }
    } else {
      ++minbuilds;
      ++maxbuilds;
    }
    prev_depth = curr_depth;
    prev_v = polypath[i];
  }
  cout << minbuilds << " " << maxbuilds << "\n";
  return 0;
}
