#include <bits/stdc++.h>
using namespace std;
class Node {
 public:
  Node() { dist = -1; }
  vector<unsigned int> preds;
  int dist;
  vector<unsigned int> nexts;
};
int main() {
  unsigned int n, m;
  cin >> n >> m;
  vector<Node*> nodes;
  for (int i = 0; i <= int(n); i++) {
    nodes.push_back(new Node());
  }
  for (int i = 0; i < int(m); i++) {
    unsigned int u, v;
    cin >> u >> v;
    nodes.at(v)->preds.push_back(u);
  }
  unsigned int k;
  cin >> k;
  vector<int> path(k + 1);
  for (unsigned int i = 1; i <= k; i++) {
    cin >> path.at(i);
  }
  unsigned int start = path.at(1), end = path.at(k);
  vector<bool> vis(n + 1);
  queue<unsigned int> q;
  q.emplace(end);
  vis[end] = true;
  nodes.at(end)->dist = 0;
  while (!q.empty()) {
    unsigned int curr = q.front();
    q.pop();
    int dist = 1 + nodes.at(curr)->dist;
    vector<unsigned int> preds = nodes.at(curr)->preds;
    for (unsigned int i = 0; i < preds.size(); i++) {
      unsigned int pred = preds.at(i);
      Node* predNode = nodes.at(pred);
      if (predNode->dist == -1 || predNode->dist == dist) {
        predNode->nexts.push_back(curr);
        if (!vis[pred]) {
          vis[pred] = true;
          predNode->dist = dist;
          q.emplace(pred);
        }
      }
    }
  }
  unsigned int min = 0, max = 0;
  for (unsigned int i = 1; i < k; i++) {
    Node* currNode = nodes.at(path.at(i));
    vector<unsigned int> nexts = currNode->nexts;
    unsigned int dMin = 1, dMax = 0;
    for (unsigned int j = 0; j < nexts.size(); j++) {
      if (nexts.at(j) == path.at(i + 1)) {
        dMin = 0;
      } else {
        dMax = 1;
      }
    }
    min += dMin;
    max += dMax;
  }
  cout << min << " " << max << endl;
}
